digital literacy for everyone
[lit][generate-title]
[lit]
[fig]
#### license: creative commons cc0 1.0 (public domain)
#### http://creativecommons.org/publicdomain/zero/1.0/
# print all three letter combinations using recursion
function rprint t limit
forin p "abcdefghijklmnopqrstuvwxyz"
tlen t len
l limit minus 1
ifless tlen l
# add a letter
now t plus p rprint now limit
else
# output
now " " prints
now t plus p prints
c "z" times limit # this is just...
ifequal now c # to print one...
now "" print # newline after the...
fig # loops finish
fig
next
fig
now rprint "" 3
# do the same without recursion
now "hit enter" prints lineinput
forin x "abcdefghijklmnopqrstuvwxyz"
forin y "abcdefghijklmnopqrstuvwxyz"
forin z "abcdefghijklmnopqrstuvwxyz"
now " " prints
now x plus y plus z prints
next
next
next
now "" print # print one newline after the loops
# nicer, but less useful--
# the first one you can make it do four letter combinations just by changing 3 to 4.
# the second one you have to add another forin loop, and give it another variable.
home: [lit]https://freesoftwareresistance.neocities.org[lit]