fun {Parse S}
for X in {String.tokens S &\n} collect:Collect do
case {String.tokens X & } of [X1 X2 X3] then
{Collect {String.toAtom X1}#{String.toInt X2}#{ToBool X3}}
end
end
end
fun {ToBool S}
case S of "true" then true
[] "false" then false
end
end
Now we can get our data directly out of the textual file:
{Inspect {Parse {Slurp "Data.txt"}}}