PasteRack.org
Paste # 15135
2018-02-11 19:34:35

Forked from paste # 57986.

Fork as a new paste.

Paste viewed 26 times.


Embed:

test

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

=>

5