Math and basic structure in Lisp 08-31-2015, 09:29 PM
#1
Lisp, above all else, is one of the weirdest languages I know of (other than Whitespace). Math in lLsp is just the tip of the iceberg.
What the hell are you talking about?
Lisp uses prefix notation (also known as Polish notation [thanks @Shebang]). In prefix notation-based evaluations, operators are read before operands.
Oh, that makes sense
Yeah, starting out, it's a bit annoying, but after a while, it becomes second nature.
Until you're programming in Ruby and forget it's not Lisp then totally screw yourself in every operation.
Anyway, that's basic math structure in Lisp. I might release some more mini-tutorials on the language later.
What the hell are you talking about?
Lisp uses prefix notation (also known as Polish notation [thanks @Shebang]). In prefix notation-based evaluations, operators are read before operands.
Spoiler: Example
In the following examples, a is the normal equation, whereas b is the prefix notated version.
a:
b:
a:
Code:
print 12 * (120 / 10) + 7
=>151Code:
(write(+ (* 12 (/ 120 10)) 7))
=>151Oh, that makes sense
Yeah, starting out, it's a bit annoying, but after a while, it becomes second nature.
Until you're programming in Ruby and forget it's not Lisp then totally screw yourself in every operation.
Anyway, that's basic math structure in Lisp. I might release some more mini-tutorials on the language later.
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.
don't have much in the first place, who feel the new currents and ride them the farthest.















![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)
