Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Here I am again, avoiding stack shuffling and using explaining variables.
I like this version. I tried to remove both vars
n3
andprod
, but I liked this version better.Factor lost all the advantage of the post-fix notation the way I'm using it here, though.
This is my second attempt of avoiding stack shuffling combinators and replacing all of them with just lexical variables. In the end, I had to shuffle way less than I initially thought.
I'm also experimenting with indentation to create some sort of visual structure that can guide the understanding, but I still haven't find a good format for everything. That being said, I'm quite happy with my
if
s.This is my first attempt avoiding every type of stack shuffling methods and using only lexical variables.
I've overcomplicated it but found it more readable already (for me, at least). I've tried it again and I like the second result better.
That's a good example of using EBNF.
For some reason,
accumulate*
doesn't work. I had to useaccumulate nip
.TIL
math.unicode
andmath.combinators
. Very useful!Perfect separation of functions. For me, that was the easiest solution to understand.
Great job!