Skip to content
← Back to Community
#WEEKLY Type-Level Multiplication
Profile icon
JackFly26

This is my solution to the challenge. You have to use the interactive console down in the bottom because you have to check the type of the result, not the actual value. It doesn't use any loops, because how would loops make sense with types?

To run: click run and type something like :t mult two two into the console. It will return something like mult two two :: Succ (Succ (Succ (Succ Zero))), which means 4.

The amount of Succs is the answer.

Voters
Profile icon
programmeruser
Profile icon
TheDrone7
Profile icon
Jakman
Profile icon
SelenaYang1
Profile icon
Coder100
Profile icon
JackFly26
Comments
hotnewtop
Profile icon
Coder100

Big brian

Profile icon
Jakman

@Coder100 i also have a big brian. I wonder if brian wants to change his name.

Profile icon
Coder100
Profile icon
JackFly26

That's very cool. Tell Brian hi for me. @Jakman