PasteRack.org
Paste # 15218
2017-02-23 12:11:27

Fork as a new paste.

Paste viewed 329 times.


Embed:

  1. #lang racket
  2. (define (my-map f lst)
  3.   (cond
  4.    [(empty? lst) empty]
  5.    [else (cons (f (first lst))
  6.                (my-map f (rest lst)))]))
  7.  
  8. (my-map (list (1 2 3)))

=>

application: not a procedure;

 expected a procedure that can be applied to arguments

  given: 1

  arguments...:

   2

   3