Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+2)

I'm confused by the following session at https://beyondloom.com/tools/trylil.html

# This is from the tutorial
local x:(list 1,2,3)
local y:(list 4,5,6)
print[flip x,y]  # => 142536
# So far so good
local s:"abcdef"
local l:"" split s
print[l]  # => abcdef
print[typeof l]  # => list
print[keys l]  # => 012345
local r:random[2 count s]
print[r]  # => 100111 say
print[typeof r]  # => list
print[keys r]  # 012345
# so l and r are both lists with 6 elements each
print[flip l,r]  # abcdef100111

I expected the last line to show something like a1b0c0d1e1f1. I can't tell what difference there is in the shape of the arguments to the two calls to flip.

(2 edits) (+1)

Oh never mind, I got it running on my machine and it makes more sense at the lilt REPL. `flip` expects (at least?) 2D lists.