Ad
  • Custom User Avatar

    Here I am again, avoiding stack shuffling and using explaining variables.

    I like this version. I tried to remove both vars n3 and prod, but I liked this version better.

    Factor lost all the advantage of the post-fix notation the way I'm using it here, though.

  • Custom User Avatar

    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 ifs.

  • Custom User Avatar

    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.

  • Custom User Avatar

    That's a good example of using EBNF.

  • Custom User Avatar

    It could be due to Factor on Codewars being on version 0.98, which is massively behind the main Factor dev branch. There is plans to update the Factor version as soon as a new stable version is released, however we have been expecting that release for a really long time and it is still yet to come. But one day, I guess (:

  • Custom User Avatar

    For some reason, accumulate* doesn't work. I had to use accumulate nip.

  • Custom User Avatar

    TIL math.unicode and math.combinators. Very useful!

  • Custom User Avatar

    Perfect separation of functions. For me, that was the easiest solution to understand.

    Great job!