disclose - remove one level of enclosure from a value
val.disclose()
Retrieves an enclosed value from an Enclosure.
It is similar to APL
⊃ val. If val is a
List or Array, each element
of val will be disclosed.
The enclosed value
TypeCheck if val is not disclosable
a = [1,2,3].enclose()
a
┌─────┐
│1 2 3│
└─────┘
a.disclose()
1 2 3
// A scalar cannot be further disclosed
3->disclose()
Illegal type
// A List can be disclosed if each element is disclosable
b = {a,a+1}
b
┌───────┐ ┌───────┐
│┌─────┐│ │┌─────┐│
││1 2 3││ ││2 3 4││
│└─────┘│ │└─────┘│
└───────┘ └───────┘
b.disclose()
┌─────┐ ┌─────┐
│1 2 3│ │2 3 4│
└─────┘ └─────┘