Login Register


Math and basic structure in Lisp filter_list
Author
Message
Math and basic structure in Lisp #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.

Spoiler: Example
In the following examples, a is the normal equation, whereas b is the prefix notated version.

a:
Code:
print 12 * (120 / 10) + 7 =>151
b:
Code:
(write(+ (* 12 (/ 120 10)) 7)) =>151


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.
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.

[+] 1 user Likes Inori's post
Reply

RE: Math and basic structure in Lisp #2
That share is simple indeed, I myself programmed in lisp for about a year and it was a really nice experience and I'm not sure why people hate it, probably because of the over usage of parentheses but that's a dumb excuse, anyways back on topic, it would be great if you could keep this up and go deeper in Lisp, that would be pretty nice and special and will bring joy to my heart Lol, seriously though, keep it coming if possible and thanks in advance.

Reply







Users browsing this thread: 1 Guest(s)