Skip to content

Commit

Permalink
Merge pull request #3 from 0xwille/master
Browse files Browse the repository at this point in the history
Fix a couple of bugs, disambiguate namespaces
  • Loading branch information
jfdm committed Jun 4, 2014
2 parents 028d676 + 49c5665 commit e52fc6d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Koans/04-Ranges.idr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ stepUp : Bool
stepUp = ?fillme2 == [3,6..20]

stepDown : Bool
stepDown = ?fillme3 [20,17..1]
stepDown = ?fillme3 == [20,17..1]

stopMe : List Integer
stopMe = ?fillme4 [1..]
Expand Down
18 changes: 9 additions & 9 deletions Koans/05-Lists.idr
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@ zeroOddsEvens = ?fillme2 ++ odds ++ ?fillme3 == [0,1,3,5,7,9,2,4,6,8]
-- | Complete the result of following functions.

headOList : Bool
headOList = ?fillme4 == head [5,4,3,2,1]
headOList = ?fillme4 == Vect.head [5,4,3,2,1]

tailOList : Bool
tailOList = ?fillme5 == tail [0,1,2,3,4,5]
tailOList = ?fillme5 == Vect.tail [0,1,2,3,4,5]

lastOList : Bool
lastOList = ?fillme6 == last [5,4,3,2,1]
lastOList = ?fillme6 == Vect.last [5,4,3,2,1]

initOList : Bool
initOList = ?fillme7 == init [1,2,3,4,5,6]
initOList = ?fillme7 == Vect.init [1,2,3,4,5,6]

lengthOList : Bool
lengthOList = ?fillme8 == length [1,2,3,4,5]
lengthOList = ?fillme8 == List.length [1,2,3,4,5]

reverseTheList : Bool
reverseTheList = ?fillme9 reverse [1,2,3,4,5]
reverseTheList = ?fillme9 == List.reverse [1,2,3,4,5]

first3 : Bool
first3 = ?fillme10 == take 3 [1..10]

drop3 : Bool
drop3 = ?fillme11 drop 3 [1..10]
drop3 = ?fillme11 == drop 3 [1..10]

countAllTheNumbers : Bool
countAllTheNumbers = ?fillme12 == sum [1..10]
Expand All @@ -51,10 +51,10 @@ timesAllTheNnumbers : Bool
timesAllTheNnumbers = ?fillme13 == product [1..10]

elementOrNot : Bool
elementOrNot = elem 4 ?fillme14 == True
elementOrNot = List.elem 4 ?fillme14 == True

-- | Make this function true
stopPete : List Nat
stopPete : Bool
stopPete = ?fillme15 (repeat 3) == [3,3,3,3]

-- --------------------------------------------------------------------- [ EOF ]
2 changes: 1 addition & 1 deletion Koans/06-ListComprehensions.idr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Koans.ListComprehensions

-- | What is the result of the List Comprehension.
listCompZero : Bool
listCompZero = ?fillme1 == [ x + x | x <- [1..5] ]
listCompZero = ?fillme1 == with Classes [ x + x | x <- [1..5] ]

-- | Write a list comprehension that returns all the numbers divisible by four, doubled.
myFirstListComp : List Integer -> List Integer
Expand Down

0 comments on commit e52fc6d

Please sign in to comment.