Name: Anonymous 2010-06-06 11:12
Hey /prog/,
have you done anything in Curl (http://en.wikipedia.org/wiki/Curl_%28programming_language%29)? If so, is it any good? It looks kind of Lispy, and is attached to an apparently pretty decent RIA platform.
For those who have never heard of it, here's, some variations of factorial as code samples:
{define-proc {factorial n}
{return {if n < 2
then 1
else n * {factorial (n - 1)}}}}
{define-proc {factorial n}
{let result = 1}
{for i = 2 to n do
{set result = i * result}}
{return result}}
{define-proc {factorial n}
{let loop = {proc {acc, n}
{return {if n < 2
then acc
else {loop acc * n, n - 1}}}}}
{return {loop 1, n}}}
have you done anything in Curl (http://en.wikipedia.org/wiki/Curl_%28programming_language%29)? If so, is it any good? It looks kind of Lispy, and is attached to an apparently pretty decent RIA platform.
For those who have never heard of it, here's, some variations of factorial as code samples:
{define-proc {factorial n}
{return {if n < 2
then 1
else n * {factorial (n - 1)}}}}
{define-proc {factorial n}
{let result = 1}
{for i = 2 to n do
{set result = i * result}}
{return result}}
{define-proc {factorial n}
{let loop = {proc {acc, n}
{return {if n < 2
then acc
else {loop acc * n, n - 1}}}}}
{return {loop 1, n}}}