0
votes

I'd rather use let ... and ... and ... in than nested let's when possible, but the normal let syntax doesn't allow this for expressions that depend on each other.

Not allowed:

let encrypt password =
    let seed = int 16
    and keys = xlat seed (length password)
    and plaintext = map code (explode password) in
        map2 logxor plaintext keys

Does OCaml have an equivalent to Lisp's let*, which does allow this?

1

1 Answers

2
votes

Nested let's don't need nested indentation, so that's good enough.