Petite chez scheme confusing function with variable? (variable ___ is not bound) -
i've started learning scheme , i'm having trouble. using petite chez scheme (64-bit) windows. have been reading on examples using functions 'every' , 'keep' , 'accumulate' , understand built in , known petite (i.e. not have defined before use). when enter examples have read test them, error returned. example-
;; make nouns plural (define (plural noun) (if (equal? (last noun) ’y) (word (bl noun) ’ies) (word noun ’s))) > (every plural ’(beatle turtle holly kink zombie)) ;; example input (beatles turtles hollies kinks zombies) ;; expected output
instead receive error "variable every not bound". if 'every' being treated variable rather known function. receive same error when try examples 'keep' , 'accumulate'. coding correct assume (since copied book i'm reading). wrong in thinking these functions built in , not need defined or there other issue? hope can shed light on this.
the every
procedure defined in srfi-1 , not part of standard language. refer project srfis available in chez scheme.
and besides, don't think every
procedure you're looking for, want map
- please check documentation first!
(map plural '(beatle turtle holly kink zombie))
Comments
Post a Comment