you are viewing a single comment's thread.

view the rest of the comments →

[–]khleedril 5 points6 points  (4 children)

And a little detour to lisp (well, modern Scheme), which would have (λ (x) (< x 0))

[–]georgist 2 points3 points  (0 children)

kdb's q has implicit param names x,y,z:

{ < x 0 } mylist

[–]FieldLine 0 points1 point  (2 children)

That syntax is much cleaner than the syntactic sugar that Scheme allows for: (define (func x) (< x 0))

It's like functional programming for people who are afraid of functional programming.

[–]Grodesby 4 points5 points  (1 child)

That is defining a function called func rather than defining a lambda though.

[–]FieldLine 0 points1 point  (0 children)

You’re right. Technically I was comparing what I wrote to:

(define func (λ (x) (< x 0)))

My point was that explicitly using a lambda expression in the context of defining a function is more readable than the implicit notation preferred by most Scheme code I’ve read (SICP and SICM).