Ad
  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    TL;DR: Look at the lambda calculus definition of church_pow - (ce cb) f x.
    Functions inside brackets are composed ; functions on the outside are just parameters for the previous function.
    You can translate this definition into this resulting call ce(cb)(f)(x).
    You can leave out each parameter that is not included inside brackets.
    The same goes for church_mul: c1 (c2 f) x becomes c1(c2(f))(x), meaning you can leave out the x.

  • Custom User Avatar

    Hi - as someone who also discovered this area recently and who found it really interesting, I can highly recommend the following 2 videos that were linked to me in the Codewars Discord:

    https://www.youtube.com/watch?v=3VQ382QG-y4

    and

    https://www.youtube.com/watch?v=pAnLQ9jwN-E

    They use JavaScript rather than Python but it's very understandable.

  • Custom User Avatar

    Why were you able to leave out (f)(x) on church_pow and it still worked? Still trying to fully wrap my head around this concept, thx.

  • Custom User Avatar

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

  • Custom User Avatar

    Wizardry. Pure and simple. Kudos, man.

  • Custom User Avatar
  • Custom User Avatar

    One can believe whatever one pleases (hmm) but the convention in algebra and logic is to use the term "term" exactly this ways, and I think this way "does type check" because we use notions of algebra (with one "real analysis metaphor") in this task (i.e. polynomial, differential).
    I think you refer to some programming language specifications -- but these usually don't use notions of polynomial, differential or equation so it does not type check, iswim!
    There's another subtle issue as the term "polynomial" sometimes stands for both syntactical and semantical object (particular expression AND particular function); in general you do differentiate functions, not expressions, but then the funny thing about polynomials is you can differentiate them purely syntactically; then you do some jumps between language and metalanguage and it doesn't seem to do harm in general but oh that's so dirty; but why do I even write it? if you were curious you'd be already reading some abstract algebra or model theory (highly recommended topics btw).

    ok, I can't help this: "mathematical operators" is a funny pleonasm, perhaps to distinguish them from "geographical operators"? ;)

    I know what you mean, usually that's "arithmetical operators"; these names again seem to be byproduct of the way we write BNF for expressions in programming languages; some operations are called arithmetical as they rely on ALU hardware implementation or traditionally did, so symbols for them are "arithmetical operators" to distinguish from say some compilation-time ones like casting or pointers or constructors sometimes... it's just not a very fortunate overlap of vocabulary I guess.

    It doesn't really matter, it's important the description of this task is no longer offensive :)
    You know so many people these days are offended with some use of words or another, and I never had any fun in this so decided to fight for my right to be offended by confusing terms with predicates.

    Hugs'n'kisses,
    the serverly offended snappy comrade drcz

  • Custom User Avatar

    I believe term is another thing all together. A polynomial consists of terms seperated by mathematical operators. I guess expreession could be a better word.

  • Custom User Avatar

    Fixed, thanks!

  • Custom User Avatar
  • Custom User Avatar

    Modified, thanks!

  • Custom User Avatar

    Hi,
    racket version is missing #lang racket header!

  • Custom User Avatar

    Hi, racket version is initialized with (require going), should be (provide going), otherwise the tests don't work.

  • Loading more items...