Change permissions
This commit is contained in:
parent
2b1d879eeb
commit
a681ad79f2
6 changed files with 129 additions and 129 deletions
0
BetterThanRacket.fs
Executable file → Normal file
0
BetterThanRacket.fs
Executable file → Normal file
0
FSharpTest.fsproj
Executable file → Normal file
0
FSharpTest.fsproj
Executable file → Normal file
34
FSharpTest.sln
Executable file → Normal file
34
FSharpTest.sln
Executable file → Normal file
|
|
@ -1,17 +1,17 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio 15
|
||||||
Project("{f2a71f9b-5d33-465a-a702-920d77279786}") = "FSharpTest", "FSharpTest.fsproj", "{5F2677D3-E1C3-4C0C-9184-7F9C5838DEF2}"
|
Project("{f2a71f9b-5d33-465a-a702-920d77279786}") = "FSharpTest", "FSharpTest.fsproj", "{5F2677D3-E1C3-4C0C-9184-7F9C5838DEF2}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{5F2677D3-E1C3-4C0C-9184-7F9C5838DEF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{5F2677D3-E1C3-4C0C-9184-7F9C5838DEF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{5F2677D3-E1C3-4C0C-9184-7F9C5838DEF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{5F2677D3-E1C3-4C0C-9184-7F9C5838DEF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{5F2677D3-E1C3-4C0C-9184-7F9C5838DEF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{5F2677D3-E1C3-4C0C-9184-7F9C5838DEF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{5F2677D3-E1C3-4C0C-9184-7F9C5838DEF2}.Release|Any CPU.Build.0 = Release|Any CPU
|
{5F2677D3-E1C3-4C0C-9184-7F9C5838DEF2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
|
||||||
6
OtherFile.fs
Executable file → Normal file
6
OtherFile.fs
Executable file → Normal file
|
|
@ -1,4 +1,4 @@
|
||||||
namespace SomeNamespace
|
namespace SomeNamespace
|
||||||
|
|
||||||
module SomeModule =
|
module SomeModule =
|
||||||
let theAnswer = 42
|
let theAnswer = 42
|
||||||
218
Program.fs
Executable file → Normal file
218
Program.fs
Executable file → Normal file
|
|
@ -1,109 +1,109 @@
|
||||||
// Learn more about F# at http://fsharp.org
|
// Learn more about F# at http://fsharp.org
|
||||||
|
|
||||||
open System
|
open System
|
||||||
|
|
||||||
open SomeNamespace.SomeModule
|
open SomeNamespace.SomeModule
|
||||||
|
|
||||||
open BetterThanRacket
|
open BetterThanRacket
|
||||||
|
|
||||||
open System.Numerics
|
open System.Numerics
|
||||||
open System.Collections.Generic
|
open System.Collections.Generic
|
||||||
|
|
||||||
//open System.Windows.Forms
|
//open System.Windows.Forms
|
||||||
|
|
||||||
(* let rec fib n =
|
(* let rec fib n =
|
||||||
if n = 0 then 0
|
if n = 0 then 0
|
||||||
else if n = 1 then 1
|
else if n = 1 then 1
|
||||||
else fib(n-2) + fib(n-1) *)
|
else fib(n-2) + fib(n-1) *)
|
||||||
|
|
||||||
|
|
||||||
(*
|
(*
|
||||||
let rec fib n =
|
let rec fib n =
|
||||||
match n with
|
match n with
|
||||||
| 0 -> 0
|
| 0 -> 0
|
||||||
| 1 -> 1
|
| 1 -> 1
|
||||||
| _ -> fib(n-2) + fib(n-1)
|
| _ -> fib(n-2) + fib(n-1)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
|
||||||
(* let rec fib n =
|
(* let rec fib n =
|
||||||
match n with
|
match n with
|
||||||
| 0 | 1 -> n
|
| 0 | 1 -> n
|
||||||
| _ -> fib(n-2) + fib (n-1) *)
|
| _ -> fib(n-2) + fib (n-1) *)
|
||||||
|
|
||||||
|
|
||||||
(*
|
(*
|
||||||
let rec factorial n =
|
let rec factorial n =
|
||||||
if n = 0 then 1
|
if n = 0 then 1
|
||||||
else n * factorial(n-1)
|
else n * factorial(n-1)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
(*
|
(*
|
||||||
let rec factorial n =
|
let rec factorial n =
|
||||||
match n with
|
match n with
|
||||||
| 0 -> 1
|
| 0 -> 1
|
||||||
| _ -> n * factorial(n-1)
|
| _ -> n * factorial(n-1)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
type Student = {
|
type Student = {
|
||||||
LastName : string
|
LastName : string
|
||||||
FirstName : string
|
FirstName : string
|
||||||
EnrollmentNumber : int
|
EnrollmentNumber : int
|
||||||
Fee:int
|
Fee:int
|
||||||
}
|
}
|
||||||
|
|
||||||
(*
|
(*
|
||||||
let sumOfStudentFees stud =
|
let sumOfStudentFees stud =
|
||||||
stud
|
stud
|
||||||
// You don't even need to filter all students because they are
|
// You don't even need to filter all students because they are
|
||||||
// automatically students
|
// automatically students
|
||||||
|> List.map (fun x -> x.Fee)
|
|> List.map (fun x -> x.Fee)
|
||||||
|> List.fold (fun x y -> x + y) 0
|
|> List.fold (fun x y -> x + y) 0
|
||||||
*)
|
*)
|
||||||
|
|
||||||
(*
|
(*
|
||||||
let sumOfStudentFees stud =
|
let sumOfStudentFees stud =
|
||||||
stud
|
stud
|
||||||
// You don't even need to filter all students because they are
|
// You don't even need to filter all students because they are
|
||||||
// automatically students
|
// automatically students
|
||||||
|> List.map (fun x -> x.Fee)
|
|> List.map (fun x -> x.Fee)
|
||||||
|> List.fold (( + )) 0
|
|> List.fold (( + )) 0
|
||||||
*)
|
*)
|
||||||
|
|
||||||
(*let sumOfStudentFees stud =
|
(*let sumOfStudentFees stud =
|
||||||
List.sumBy (fun x -> x.Fee) stud
|
List.sumBy (fun x -> x.Fee) stud
|
||||||
*)
|
*)
|
||||||
[<EntryPoint>]
|
[<EntryPoint>]
|
||||||
let main argv =
|
let main argv =
|
||||||
(*let result = fib 10
|
(*let result = fib 10
|
||||||
printfn "%d" result
|
printfn "%d" result
|
||||||
|
|
||||||
let myList = [1;4;5;3;2]
|
let myList = [1;4;5;3;2]
|
||||||
List.map (fun x -> printfn "%d" x) myList |> ignore*)
|
List.map (fun x -> printfn "%d" x) myList |> ignore*)
|
||||||
|
|
||||||
(*let marcus = { LastName = "Müller"; FirstName = "Marcus"; EnrollmentNumber = 0; Fee = 100 }
|
(*let marcus = { LastName = "Müller"; FirstName = "Marcus"; EnrollmentNumber = 0; Fee = 100 }
|
||||||
let marc = { LastName = "Müller"; FirstName = "Marc"; EnrollmentNumber = 0; Fee = 100 }
|
let marc = { LastName = "Müller"; FirstName = "Marc"; EnrollmentNumber = 0; Fee = 100 }
|
||||||
|
|
||||||
let listOfStudents = [ marc; marcus ]
|
let listOfStudents = [ marc; marcus ]
|
||||||
|
|
||||||
printfn "%d" (sumOfStudentFees(listOfStudents))*)
|
printfn "%d" (sumOfStudentFees(listOfStudents))*)
|
||||||
|
|
||||||
let num = new BigInteger(122231)
|
let num = new BigInteger(122231)
|
||||||
|
|
||||||
let myList = [1;3;4;6;7]
|
let myList = [1;3;4;6;7]
|
||||||
|
|
||||||
myList
|
myList
|
||||||
|> List.map ((+) 5)
|
|> List.map ((+) 5)
|
||||||
|> printfn "%A"
|
|> printfn "%A"
|
||||||
|
|
||||||
num.ToString()
|
num.ToString()
|
||||||
|> printfn "%s"
|
|> printfn "%s"
|
||||||
|
|
||||||
printfn "%d" theAnswer
|
printfn "%d" theAnswer
|
||||||
|
|
||||||
printfn "%b" (BetterThanRacket.BinaryTreeHausübung.BinaryTreeContains 56 BinaryTreeHausübung.smallTree)
|
printfn "%b" (BetterThanRacket.BinaryTreeHausübung.BinaryTreeContains 56 BinaryTreeHausübung.smallTree)
|
||||||
|
|
||||||
printfn "%A" (Euklid.euklid 128 36)
|
printfn "%A" (Euklid.euklid 128 36)
|
||||||
printfn "%A" (Euklid.erwEuklid 128 36)
|
printfn "%A" (Euklid.erwEuklid 128 36)
|
||||||
|
|
||||||
0 // return an integer exit code
|
0 // return an integer exit code
|
||||||
|
|
|
||||||
0
asdf.fs
Executable file → Normal file
0
asdf.fs
Executable file → Normal file
Loading…
Add table
Add a link
Reference in a new issue