Tips and Tricks
Here are a few cool things you might want to know to make your programming experience better.
- lin is interpreted in Javascript and inherits its super-loose datatype features, meaning that most of the type coercion tricks that work in Javascript work in lin.
- To convert a string to a number, you can do something like
( 1234 ) 0+. The0+is the key part. - To floor a number, you can do
1234.56 0|. To round a number, you can do1234.56 .5+ 0|.
- To convert a string to a number, you can do something like
- lin does TCO (tail-call optimization), making it possible to do infinite recursion without blowing up the call stack. In addition, looping commands like
eware easy ways to prevent stack overflow. - Make good use of iterating commands like
mapandfold. They are extremely handy and can be used for a diverse variety of cases.