PasteRack.org
Paste # 67092
2018-02-11 19:37:33

Forked from paste # 98131.

Fork as a new paste.

Paste viewed 35 times.


Embed:

  1. #lang racket
  2. (define (foo xs)
  3.  
  4.             (cond [(null? xs) '()]
  5.  
  6.                   [(number? xs) xs]
  7.  
  8.                   [(list? xs) (cdr xs)]
  9.  
  10.                   [(boolean? xs) #t]
  11.  
  12.                   [#t #f]))
  13. foo('(1 2 3 4))

=>

#<procedure:foo>

application: not a procedure;

 expected a procedure that can be applied to arguments

  given: '(1 2 3 4)

  arguments...: [none]