Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/The-Name-Game/J/the-name-game.j
Normal file
21
Task/The-Name-Game/J/the-name-game.j
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
T=:TEMPLATE=: noun define
|
||||
(X), (X), bo-b(Y)
|
||||
Banana-fana fo-f(Y)
|
||||
Fee-fi-mo-m(Y)
|
||||
(X)!
|
||||
)
|
||||
|
||||
nameGame=: monad define
|
||||
X=. y
|
||||
Y=. tolower }.^:('aeiouAEIOU' -.@:e.~ {.) y
|
||||
heady=. tolower {. y
|
||||
t=. TEMPLATE -. '()'
|
||||
'ix iy'=. I. 'XY' =/ t
|
||||
tbox=. ;/ t
|
||||
match=. heady = (<: iy){::"0 _ tbox
|
||||
remove =. match # iy
|
||||
special_rule_box=. a: (<: remove)}tbox
|
||||
ybox=. (< Y) iy} special_rule_box
|
||||
XBox=. (< X) ix} ybox
|
||||
; XBox
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue