Ad
  • Custom User Avatar

    Ended up copying and pasting all the functions from the "basics-binary-scott" test solution in the Codewars lambda calculus compiler repository, so I had all the basics functions. I don't know how we are expected to come up with the collatz length solution without rewriting the entire system from scrach with all the shift and binary operations functions. Smh

  • Custom User Avatar

    Do we have to define all needed functions with the lambda calculus version? I'm used to Church numerals and would be fine with those, but with "ScottBinary" being configured as the encoding, I'm not sure about where to start at all.

  • Custom User Avatar

    I could have also used that, yeah, for a more lambda calculus-like function, but in the end there's also the lambda calculus version of the kata, so I did that properly as well.

  • Custom User Avatar

    Just import fix 😝

  • Custom User Avatar

    Ahah, yeah, I guess I was still in the mindset of pure LC, I will try again with direct recursion, if possible. If not, I did read of ways of defining Y in haskell in a proper way, thank you.

  • Custom User Avatar

    I've seen it once before, probably doing something very similar ( but it's been a while ). I never really solved that then.

    I think it just can't be done in GHC. But you don't need Y, you are allowed to just use a direct recursive definition ( because it's Haskell, and not strictly LC ), and I suspect it'll work that way.

    Does that answer your question?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution