PasteRack.org
Paste # 98131
2018-02-11 19:37:09

Fork as a new paste.

Paste viewed 77 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(5)

=>

#<procedure:foo>

application: not a procedure;

 expected a procedure that can be applied to arguments

  given: 5

  arguments...: [none]