03-06 Function Composition (Introduction to Haskell)

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024

ความคิดเห็น • 2

  • @tophy9865
    @tophy9865 3 หลายเดือนก่อน

    You shorten (\y -> y >= 5) to (>= 5) but you can do the same with (\x -> x * x) with (^ 2)

    • @andresloeh
      @andresloeh 3 หลายเดือนก่อน +2

      Yes, you absolutely can. The reason I'm not putting emphasis on this here is that due to the overloaded type of (^) and me proposing -Wall, you will then get defaulting warnings, and overloading in general and defaulting in particular is a topic I'm only handling thoroughly in Part 4 of the course ...