Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 572 Bytes

typeunder.md

File metadata and controls

26 lines (19 loc) · 572 Bytes

Function

typeunder — the underlying type of a value

Synopsis

typeunder(val: any) -> type

Description

The typeunder function returns the type of its argument val. If this type is a named type, then the referenced type is returned instead of the named type.

Examples

echo  '{which:"chocolate"}(=flavor)' |
  super -z -c 'yield {typeof:typeof(this),typeunder:typeunder(this)}' -

=>

{typeof:<flavor={which:string}>,typeunder:<{which:string}>}