Skip to content

Commit

Permalink
Move files & add argumentOrParameter iteration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wenkokke committed Jan 22, 2024
1 parent 0f22b9f commit 6221f2f
Show file tree
Hide file tree
Showing 15 changed files with 581 additions and 15 deletions.
2 changes: 2 additions & 0 deletions data/playground/haskell/branch.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ fromEither :: (a -> c) -> (b -> c) -> Either a b -> c
fromEither f g x = case x of
Left l -> f l
Right r -> g r

someFunction x (y1 : y2 : ys) (a, b, (c, [d])) = undefined
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
fib :: Integer -> Integer
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)

---

[#1 Content] =
[#1 Removal] =
[#1 Domain] = 1:0-1:9
0| fib :: Integer -> Integer

1| fib 0 = 0
>---------<
2| fib 1 = 1

3| fib n = fib (n-1) + fib (n-2)

4|


[#1 Insertion delimiter] = "\n"


[#2 Content] =
[#2 Removal] =
[#2 Domain] = 2:0-2:9
0| fib :: Integer -> Integer

1| fib 0 = 0

2| fib 1 = 1
>---------<
3| fib n = fib (n-1) + fib (n-2)

4|


[#2 Insertion delimiter] = "\n"


[#3 Content] =
[#3 Removal] =
[#3 Domain] = 3:0-3:29
0| fib :: Integer -> Integer

1| fib 0 = 0

2| fib 1 = 1

3| fib n = fib (n-1) + fib (n-2)
>-----------------------------<
4|


[#3 Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
abs :: Int -> Int
abs x
| x >= 0 = x
| otherwise = -x

---

[#1 Content] =
[#1 Removal] =
[#1 Domain] = 1:0-3:20
0| abs :: Int -> Int

1| abs x
>-----
2| | x >= 0 = x
--------------------
3| | otherwise = -x
--------------------<
4|


[#1 Insertion delimiter] = "\n"


[#2 Content] =
[#2 Domain] = 2:6-2:20
0| abs :: Int -> Int

1| abs x

2| | x >= 0 = x
>--------------<
3| | otherwise = -x

4|


[#2 Removal] = 2:4-2:20
0| abs :: Int -> Int

1| abs x

2| | x >= 0 = x
>----------------<
3| | otherwise = -x

4|


[#2 Leading delimiter] = 2:5-2:6
0| abs :: Int -> Int

1| abs x

2| | x >= 0 = x
>-<
3| | otherwise = -x

4|


[#2 Insertion delimiter] = "\n"


[#3 Content] =
[#3 Domain] = 3:6-3:20
0| abs :: Int -> Int

1| abs x

2| | x >= 0 = x

3| | otherwise = -x
>--------------<
4|


[#3 Removal] = 3:4-3:20
0| abs :: Int -> Int

1| abs x

2| | x >= 0 = x

3| | otherwise = -x
>----------------<
4|


[#3 Leading delimiter] = 3:5-3:6
0| abs :: Int -> Int

1| abs x

2| | x >= 0 = x

3| | otherwise = -x
>-<
4|


[#3 Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
bap :: Int -> Int
bap x
| x > 0, x == 0 = x
| otherwise = -x

---

[#1 Content] =
[#1 Removal] =
[#1 Domain] = 1:0-3:20
0| bap :: Int -> Int

1| bap x
>-----
2| | x > 0, x == 0 = x
------------------------
3| | otherwise = -x
--------------------<
4|


[#1 Insertion delimiter] = "\n"


[#2 Content] =
[#2 Domain] = 2:6-2:24
0| bap :: Int -> Int

1| bap x

2| | x > 0, x == 0 = x
>------------------<
3| | otherwise = -x

4|


[#2 Removal] = 2:4-2:24
0| bap :: Int -> Int

1| bap x

2| | x > 0, x == 0 = x
>--------------------<
3| | otherwise = -x

4|


[#2 Leading delimiter] = 2:5-2:6
0| bap :: Int -> Int

1| bap x

2| | x > 0, x == 0 = x
>-<
3| | otherwise = -x

4|


[#2 Insertion delimiter] = "\n"


[#3 Content] =
[#3 Domain] = 3:6-3:20
0| bap :: Int -> Int

1| bap x

2| | x > 0, x == 0 = x

3| | otherwise = -x
>--------------<
4|


[#3 Removal] = 3:4-3:20
0| bap :: Int -> Int

1| bap x

2| | x > 0, x == 0 = x

3| | otherwise = -x
>----------------<
4|


[#3 Leading delimiter] = 3:5-3:6
0| bap :: Int -> Int

1| bap x

2| | x > 0, x == 0 = x

3| | otherwise = -x
>-<
4|


[#3 Insertion delimiter] = "\n"
Loading

0 comments on commit 6221f2f

Please sign in to comment.