Re:You already use Lisp syntax
by bjourne on Wednesday May 21, 2014 @08:20AM
(#7777787)
Take a look at factor: http://factorcode.org/ Your example would be written as:
File is opened into a sequence of lines, then the sequence is filtered so that only lines containing "SEARCH" remain, then members removes duplicates, then length gets the number of elements left in the sequence. In the shell, "|" is the function composition operator, in haskell it's "." In Factor, any whitespace is function composition!
[ Parent
| on HN ]
There are no comments on this comment yet.