a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment
mk  ·  1872 days ago  ·  link  ·    ·  parent  ·  post: Paul Graham created another Lisp: Bel

It is like Jony Ive wrote this:

  (set prims '((id join xar xdr wrb ops)

(car cdr type sym nom rdb cls stat sys)

(coin)))

  (def applyprim (f args s r m)

(aif (some [mem f _] prims)

(if (udrop (cdr it) args)

(sigerr 'overargs s r m)

(with (a (car args)

b (cadr args))

(eif v (case f

id (id a b)

join (join a b)

car (car a)

cdr (cdr a)

type (type a)

xar (xar a b)

xdr (xdr a b)

sym (sym a)

nom (nom a)

wrb (wrb a b)

rdb (rdb a)

ops (ops a b)

cls (cls a)

stat (stat a)

coin (coin)

sys (sys a))

(sigerr v s r m)

(mev s (cons v r) m))))

(sigerr 'unknown-prim s r m)))

I like the brevity in Arc. I don’t know why, but it works for me.