fax | let add a b = [a..] !! b in let mul a b = map (add a) [b..] !! b in mul 5 3 > let add a b = [a..] !! b in let mul a b = map (add a) [b..] !! b in mul 5 3 |

lambdabot | 11 |

fax | hm :/ > let add a b = [a..] !! b in let mul a b = (map (add a) [b..]) !! b in mul 5 3 |

lambdabot | 11 |

fax | what |

rashakil | 5 + 3 + 3 = 11 |

fax | oh |

rashakil | > let add a b = [a..] !! b in let mul a b = iterate (add a) 0 !! b in mul 5 3 |

lambdabot | 15 |

fax | yes :D > let add a b = [a..] !! b in let mul a b = iterate (add a) 0 !! b in let factorial a = (foldr mul (map (mul a) [0..])) in factorial 4 |

lambdabot | Couldn't match expected type `Int' against inferred type `[Int]' |

fax | :S > let add a b = [a..] !! b in let mul a b = iterate (add a) 0 !! b in let factorial a = foldr mul 1 [1..a] in factorial 4 |

lambdabot | 24 |

rashakil | > let add a b = [a..] !! b in let mul a b = map (add a) [b..] !! b in let factorial a = product [1..a] in let product = foldl add 3.14 in factorial 4 |

lambdabot | 24 |

fax | :O 3.14 ?!?! |

rashakil | for better accuracy, use 3.142 |

fax | what is that wtf :D mul and product are never used so you can change them to anything? > let add a b = [a..] !! b in let mul a b = iterate (add a) 0 !! b in let factorial a = foldr mul 1 [1..a] in factorial 5 |

lambdabot | 120 |

fax | > let add a b = [a..] !! b in let mul a b = iterate (add a) 0 !! b in let factorial a = foldr mul 1 [1..a] in factorial 6 |

lambdabot | 720 |

fax | > let add a b = [a..] !! b in let mul a b = iterate (add a) 0 !! b in let factorial a = foldr mul 1 [1..a] in factorial 10 |

lambdabot | Terminated |

fax | ahaha can you define a function which is applied like, "5 f" ? |

rashakil | > let (!) x = product [1..x] in (5 !) |

lambdabot | 120 |

fax | cool |

rashakil | That's not really Haskell though. |

fax | no? why nt? |