Open Chaz6 opened 3 years ago
I'm able to reproduce this on Nix too:
~ ∫ nix shell nixpkgs#hobbes -c hi -s -x -e 'roll(|1=("chicken", roll(|1=("hot dog", roll(|1=("pizza", roll(|0=()|))|))|))|) :: ^x.(()+([char]*x))'
"nekcihcgod tohazzip"
Thank you for reporting this, it looks like we have an issue printing the output, it's reversed. I'll fix it. The following works:
~ ∫ nix shell nixpkgs#hobbes -c hi [14:01:37]
hi : an interactive shell for hobbes
type ':h' for help on commands
> fix=\xs.reverse(slice(xs,0,size(xs)))
> fix(roll(|1=("chicken", roll(|1=("hot dog", roll(|1=("pizza", roll(|0=()|))|))|))|) :: ^x.(()+([char]*x)))
"pizzahot dogchicken"
>
When I run one of the evaluation examples, the output shown is different to that of the example.
The example is thus:-
The actual output is :-