Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Anonymous-recursion/UTFool/anonymous-recursion.utfool
Normal file
17
Task/Anonymous-recursion/UTFool/anonymous-recursion.utfool
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
···
|
||||
http://rosettacode.org/wiki/Anonymous_recursion
|
||||
···
|
||||
⟦import java.util.function.UnaryOperator;⟧
|
||||
|
||||
■ AnonymousRecursion
|
||||
§ static
|
||||
▶ main
|
||||
• args⦂ String[]
|
||||
if 0 > Integer.valueOf args[0]
|
||||
System.out.println "negative argument"
|
||||
else
|
||||
System.out.println *UnaryOperator⟨Integer⟩° ■
|
||||
▶ apply⦂ Integer
|
||||
• n⦂ Integer
|
||||
⏎ n ≤ 1 ? n ! (apply n - 1) + (apply n - 2)
|
||||
°.apply Integer.valueOf args[0]
|
||||
Loading…
Add table
Add a link
Reference in a new issue