PasteRack.org
Paste # 92773
2015-02-28 19:07:37

Fork as a new paste.

Paste viewed 276 times.


Embed:

matching for bbloom

  1. #lang racket
  2.  
  3. (define (foo x)
  4.   (match x
  5.     [(and all (list first _ ...))
  6.      (printf "all: ~a~nfirst: ~a~n" all first)]))
  7.  
  8. (foo '(1))
  9. (foo '(2 3))

=>

all: (1)

first: 1

all: (2 3)

first: 2