Idris2/tests/base/data_list001/List.idr

27 lines
506 B
Idris
Raw Normal View History

2022-02-11 12:28:36 +03:00
import Data.List
deleteAtCases : List (List Nat)
deleteAtCases = [
deleteAt 0 [3],
deleteAt 0 [3, 4],
deleteAt 1 [3, 4],
deleteAt 0 [3, 4, 5],
deleteAt 1 [3, 4, 5],
deleteAt 2 [3, 4, 5]
]
2022-03-04 02:40:18 +03:00
replaceAtCases : List (List Nat)
replaceAtCases = [
replaceAt 0 6 [3],
replaceAt 0 6 [3, 4],
replaceAt 1 6 [3, 4],
replaceAt 0 6 [3, 4, 5],
replaceAt 1 6 [3, 4, 5],
replaceAt 2 6 [3, 4, 5]
]
2022-02-11 12:28:36 +03:00
main : IO ()
2022-03-04 02:40:18 +03:00
main = do
printLn deleteAtCases
printLn replaceAtCases