Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
// Display a linear combination. Nigel Galloway: March 28th., 2018
|
||||
let fN g =
|
||||
let rec fG n g=match g with
|
||||
|0::g -> fG (n+1) g
|
||||
|1::g -> printf "+e(%d)" n; fG (n+1) g
|
||||
|(-1)::g -> printf "-e(%d)" n; fG (n+1) g
|
||||
|i::g -> printf "%+de(%d)" i n; fG (n+1) g
|
||||
|_ -> printfn ""
|
||||
let rec fN n g=match g with
|
||||
|0::g -> fN (n+1) g
|
||||
|1::g -> printf "e(%d)" n; fG (n+1) g
|
||||
|(-1)::g -> printf "-e(%d)" n; fG (n+1) g
|
||||
|i::g -> printf "%de(%d)" i n; fG (n+1) g
|
||||
|_ -> printfn "0"
|
||||
fN 1 g
|
||||
|
|
@ -0,0 +1 @@
|
|||
fN[-1;-2;0;-3]
|
||||
|
|
@ -0,0 +1 @@
|
|||
fN[1]
|
||||
|
|
@ -0,0 +1 @@
|
|||
fN [1;2;3]
|
||||
|
|
@ -0,0 +1 @@
|
|||
fN [0;1;2;3]
|
||||
|
|
@ -0,0 +1 @@
|
|||
fN[1;0;3;4]
|
||||
|
|
@ -0,0 +1 @@
|
|||
fN[1;2;0]
|
||||
|
|
@ -0,0 +1 @@
|
|||
fN[0;0;0]
|
||||
|
|
@ -0,0 +1 @@
|
|||
fN[0]
|
||||
|
|
@ -0,0 +1 @@
|
|||
fN[1;1;1]
|
||||
|
|
@ -0,0 +1 @@
|
|||
fN[-1;-1;-1]
|
||||
Loading…
Add table
Add a link
Reference in a new issue