Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
4
Task/Extend-your-language/J/extend-your-language-1.j
Normal file
4
Task/Extend-your-language/J/extend-your-language-1.j
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
if2=: 2 :0
|
||||
'`b1 b2'=. n
|
||||
m@.(b1 + 2 * b2) f.
|
||||
)
|
||||
14
Task/Extend-your-language/J/extend-your-language-2.j
Normal file
14
Task/Extend-your-language/J/extend-your-language-2.j
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
f0=: [: smoutput 'neither option: ' , ":
|
||||
f1=: [: smoutput 'first option: ' , ":
|
||||
f2=: [: smoutput 'second option: ' , ":
|
||||
f3=: [: smoutput 'both options: ' , ":
|
||||
|
||||
isprime=: 1&p:
|
||||
iseven=: 0 = 2&|
|
||||
|
||||
f0`f1`f2`f3 if2 (isprime`iseven)"0 i.5
|
||||
second option: 0
|
||||
neither option: 1
|
||||
both options: 2
|
||||
first option: 3
|
||||
second option: 4
|
||||
Loading…
Add table
Add a link
Reference in a new issue