6 ms·
If you're not familiar with Japanese language, here is a rough English translation of the first code example: The book is Lambda is x times x times
by cloudbonsai 5y ago
If you're not familiar with Japanese language, here is a rough
English translation of the first code example:
The book is
Lambda is x times x times x.
Numbers are 88, 7100 and 55.
A, B, C and null are Numbers.
NewNumber is the sum of A and B.
Display NewNumber.
Result is <apply Lambda to 741> plus 919.
Display [sum of Result and NewNumber].
End.
If it feels to you like a riddle poem, it's exactly what the
original program sounds like in Japanese.
In case anyone is wondering, here is an equivalent Python code:
def main():
f = lambda x: x * x * x
numbers = [88, 7100, 55]
a, b, c = numbers
new_number = a + b
print(new_number)
result = f(741) + 919
print(result + new_number)
- Arnavion 5y ago>Lambda is x times x times x. A lambda of x is x times x. (X de X kakeru X desu)
- wodenokoto 5y agoThe author makes a note of function names not being imperative, so the display lines would perhaps be better translated as: NewNumber is shown (Also gets the word order closer to the original)
- trasz 5y agoIe it’s a Japanese COBOL?