Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Mad-Libs/J/mad-libs-1.j
Normal file
14
Task/Mad-Libs/J/mad-libs-1.j
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
require 'general/misc/prompt regex'
|
||||
|
||||
madlib=:3 :0
|
||||
smoutput 'Please enter the story template'
|
||||
smoutput 'See http://rosettacode.org/wiki/Mad_Libs for details'
|
||||
t=.''
|
||||
while.#l=.prompt '' do. t=.t,l,LF end.
|
||||
repl=. ~.'<[^<>]*>' rxall t
|
||||
for_bef. repl do.
|
||||
aft=. prompt (}.}:;bef),': '
|
||||
t=.t rplc bef,<aft
|
||||
end.
|
||||
t
|
||||
)
|
||||
11
Task/Mad-Libs/J/mad-libs-2.j
Normal file
11
Task/Mad-Libs/J/mad-libs-2.j
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
madlib''
|
||||
Please enter the story template
|
||||
See http://rosettacode.org/wiki/Mad_Libs for details
|
||||
<name> went for a walk in the park. <he or she>
|
||||
found a <noun>. <name> decided to take it home.
|
||||
|
||||
name: Jill
|
||||
he or she: she
|
||||
noun: rock
|
||||
Jill went for a walk in the park. she
|
||||
found a rock. Jill decided to take it home.
|
||||
Loading…
Add table
Add a link
Reference in a new issue