|
|
|
|
|
by yccs27
1297 days ago
|
|
My point, which I didn’t express well there, was about the call side: How do you call func(param1: A, param2: B) -> C
with both parameters being secrets (secret1: Secret<A>, secret2: Secret<B>)? In Rust, it‘s flat_map(secret1, |param1|
map(secret2, |param2|
func(param1, param2)
)
)
or with do_notation at least a bit cleaner do! {
param1 <- secret1;
param2 <- secret2;
Secret(func(param1, param2));
}
whereas Rune manages it with func(secret1, secret2)
|
|