Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Subject

Name: Anonymous 2016-02-10 2:06

Couldn't we just consider every integer to be a function instead of +, -, etc?
That way we do not need special syntax or weird mindfucking prefix notations do just add two integers.
Consider: (1 + (2 * ((3 + 1) + 4))

* and + are just symbols passed into the functions
(could as well be (define + '+)
(define - '-)
)

3 + 1 = 4
4 + 4 = 8
2 * 8 = 16
1 + 16 = 17

Why does no language do this?

Name: Anonymous 2016-02-11 19:03

In a language that supports currying this would be even better and easier.
(define (+ a b) (...))
(define (N op) (op N))

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List