Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Starting Forth – the classic Forth language tutorial. Parent comment
Have a look at Rebol which is a mix of Forth, Logo & Lisp.
Here's an example of Rebol code (typed into the console (REPL))...
>> multiply add 1 2 3 == 9
>> multiply (add 1 2) 3 == 9
Here's an example of a conditional:
>> if equal? 1 1 [print "1 is 1!!"] 1 is 1!!
>> equal? 1 1 == true >> [print "1 is 1!!"] == [print "1 is 1!!"]
>> do [print "1 is 1!!"] 1 is 1!!
There are no comments on this comment yet.
Have a look at Rebol which is a mix of Forth, Logo & Lisp.
Here's an example of Rebol code (typed into the console (REPL))...
multiply and add are both functions which take two arguments. If I add parens then above becomes clearer. So Rebol evaluates a list of words from left to right with non-variadic functions (ie. they have fixed argument arity).Here's an example of a conditional:
if is a function which takes two arguments (as is equal?). So this is code is evaluated like this: If the first argument is true (which it is in this case!) then the second argument (which is a block) is evaluated...