mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-25 22:38:04 +02:00
SW
This commit is contained in:
parent
e7e4f64df5
commit
f93467bad7
5 changed files with 11 additions and 4 deletions
|
@ -1,9 +1,12 @@
|
|||
$ ghci binomialkoeffizient.hs
|
||||
GHCi, version 7.4.2: http://www.haskell.org/ghc/ :? for help
|
||||
GHCi, version 7.4.2:
|
||||
http://www.haskell.org/ghc/
|
||||
:? for help
|
||||
Loading package ghc-prim ... linking ... done.
|
||||
Loading package integer-gmp ... linking ... done.
|
||||
Loading package base ... linking ... done.
|
||||
[1 of 1] Compiling Main ( binomialkoeffizient.hs, interpreted )
|
||||
[1 of 1] Compiling Main
|
||||
( binomialkoeffizient.hs, interpreted )
|
||||
Ok, modules loaded: Main.
|
||||
*Main> binom 5 2
|
||||
10
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
fakAcc n acc = if (n==0) then acc else fakAcc (n-1) (n*acc)
|
||||
fakAcc n acc = if (n==0)
|
||||
then acc
|
||||
else fakAcc (n-1) (n*acc)
|
||||
fak n = fakAcc n 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue