Better HN
topnewbestaskshowjobs
Log inSign up

deech

6 karma · joined Mar 31, 2015 (11y ago) · 3 submissions

Submissions

1.

Shen Trick Shots – LambdaConf 2016(youtube.com ↗)

2 points · by deech · 10y ago · discuss

comment 11y ago · link · parent

You don't have to use any of the syntax if you don't want to. You can write directly in KLambda. Here's how `map` is defined in KLambda:

   (defun map (f l)
     (shen.map-h f l ()))

   (defun shen.map-h (f l accum)
     (cond ((= () l) (reverse accum))
           ((cons? l) (shen.map-h f (tl l) (cons (f (hd l)) accum)))
           (true (shen.f_error shen.map-h))))

comment 11y ago · link · parent

The second half of the talk (http://www.youtube.com/watch?v=lMcRBdSdO_U&t=17m30s) is about turning a JSON object into a type using macros and meta-programming.