Add new acceptance test scenario (013)
``` ERROR: The provided Plutus code called 'error' ```
This commit is contained in:
parent
9c902cdf89
commit
bc7c236b3b
|
@ -0,0 +1,2 @@
|
|||
name = "acceptance_test_013"
|
||||
version = "0.0.0"
|
|
@ -0,0 +1,13 @@
|
|||
pub fn unzip(xs: List<#(a, b)>) -> #(List<a>, List<b>) {
|
||||
when xs is {
|
||||
[] -> #([], [])
|
||||
[#(a, b), ..rest] -> {
|
||||
let #(a_tail, b_tail) = unzip(rest)
|
||||
#([a, ..a_tail], [b, ..b_tail])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test unzip_1() {
|
||||
unzip([#(1, "a"), #(2, "b")]) == #([1, 2], ["a", "b"])
|
||||
}
|
Loading…
Reference in New Issue