Welcome to the CHICKEN Scheme pasting service

this compiles pasted by C-Keen on Fri Jun 1 21:00:42 2012

(use matchable )
(define (filter->query f)
  (map (lambda (r)
         (match r
                ((y 'is       . x)     (y . x))
                ((y 'is-not   . x)     (y . (conc "!"  x)))
                ((y 'contains . x)     (y . (conc "~"  x)))
                ((y 'contains-not . x) (y . (conc "!~" x)))
                ((y 'ends     . x)     (y . (conc "$"  x)))
                ((y 'starts   . x)     (y . (conc "^"  x)))) f)))

*this* compiles pasted by C-Keen on Fri Jun 1 21:02:56 2012

(use matchable )
(define (filter->query f)
  (map (lambda (r)
         (match r
                ((y 'is       . x)     (cons y x))
                ((y 'is-not   . x)     (cons y (conc "!"  x)))
                ((y 'contains . x)     (cons y (conc "~"  x)))
                ((y 'contains-not . x) (cons y (conc "!~" x)))
                ((y 'ends     . x)     (cons y (conc "$"  x)))
                ((y 'starts   . x)     (cons y (conc "^"  x)))) f)))

and this works ;) added by ente on Fri Jun 1 21:09:24 2012

(define (filter->query f)
    (map (lambda (r)
        (match r
            ((y 'is      . x) (cons y x))
            ((y 'not     . x) (cons y (conc "!"  x)))
            ((y 'with    . x) (cons y (conc "~"  x)))
            ((y 'without . x) (cons y (conc "!~" x)))
            ((y 'ends    . x) (cons y (conc "$"  x)))
            ((y 'starts  . x) (cons y (conc "^"  x))))) f))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which one-argument R5RS procedure returns 1 when given `'(1 2 3)' as input?
Visually impaired? Let me spell it for you (wav file) download WAV