[Solved] [Sophia] How to unpack tuple


Why can’t I unpack tuple in a way specified by this documentation?

For example this does not compile:

let t = ("ak_2mwRmUeYmfuW93ti9HMSUJzCk1EYcQEfikVSzgo6k2VghsWhgU", 100)
let (addr, amount) = t

Parse error, unexpected token ‘(’ in second line.

I’m using [email protected] which runs aeternity/aeternity nodes (docker hub).


@piwo should be able to help here. I will ping him.


Hey, you can only do pattern matching using switch, so

  (first, second) => ???


Also I just noticed that the documentation you referenced is very outdated as it was created based on reasonml when Sophia wasn’t finished yet, we’ll fix this (cc @pegah)