3 ms·
There's a nice introduction here, which is aimed at experienced functional programmers: http://shenlanguage.org/documentation/Tutorials/Shen-in-15min.htm http:
by ekidd 15y ago
There's a nice introduction here, which is aimed at experienced functional programmers:
http://shenlanguage.org/documentation/Tutorials/Shen-in-15min.htm http://shenlanguage.org/documentation/Tutorials/Shen-in-15mi...
Shen appears to be a strongly-typed functional language with a Lisp-like syntax. It supports pattern matching:
(define sum-list
[] -> 0
[H|T] -> (+ H (sum-list T)))
...partial application:
(* 3) ; returns (/. X (* 3 X))
...as well as macros that can alias function names:
(defmacro logmacro
[log N] -> [log N 10])
There's also an embedded "Prolog" implemenation, though I don't know how complete it might be:
http://shenlanguage.org/documentation/prolog.htm http://shenlanguage.org/documentation/prolog.htm
However, there doesn't appear to be an object system or a monad library, and the "lazy evaluation" system uses a typical promise/force approach, which every Scheme has had for decades. So Shen may not be well-suited to the kind of fun tricks available in Haskell and (to a certain extent) Scala. Still, it's definitely an interesting language.
- masklinn 15y agoPartial application with a lisp syntax threw me for a loop, it looks weird.