lilas_boutique in Brampton is doing 3 things including…

Learn Lisp


 

lilas_boutique has written 1 entry about this goal

Help me understand a lisp's exercice, I'm new in this world 3 years ago

I want to define a Lisp function called LOLO which will be able to return the head of a syntagm. The head of s syntagm is defined as follow:

Constituent
P (The head is V, the verb)
SN (The head is N, a noun, or Nproper (proper noun)
SV (The head is V, a verb)

The LOLO defined function must give these answers when put in the listener :

(LOLO ‘(SN (Nproper Milou) > Milou
(LOLO ‘(SN (Det the) N mouse))) > Mouse
(LOLO ‘(SN (Det this) (N dog) (Adj lazzy))) > dog
(LOLO ‘(SV (V eats) (SN (Det the) (N mouse)) (SP (Prep on) (SN
(Det the) (N carpet))) > eats
(LOLO ‘(P (SN (Nproper Minou)) (SV ( mange) (SN (Det the) (N
mouse)) (SP (Prep on) (SN (Det the) (N carpet)))))) >
eats

Thanks!

Lilas



 

I want to:
43 Things Login