Self view is another library available on all types, but it has to be activated by calling a universal ".^" or (".self_^") method on original value.
Due to opaque implementation, calling "self view" methods incures no overhead as if they were called directly on base value.
val pack: ><[String] = "FOO".^.><
A common use case is to manipulate an object within expression context:
val a : Array[String] = new Array[String](2).^(_(0)="A").^(_(1)="B")
because all calls are inlined, the above expression is equivalent to:
val a : Array[String] = new Array[String](2) a(0)="A" a(1)="B"
Returns base value as an option.
Unlike general .? method, this method will create empty option for void or empty values
List().?.tp // prints: Opt(List()) List().^.?.tp // prints: Opt(\/)