YK
proc `*` *(a, b: Dollars): Dollars {.borrow.}
proc `+` *(a, b: Dollars): Dollars {.borrow.}
a = 20.Dollars * 20.Dollars
Size: a a a
YK
proc `*` *(a, b: Dollars): Dollars {.borrow.}
proc `+` *(a, b: Dollars): Dollars {.borrow.}
a = 20.Dollars * 20.Dollars
YK
Б
K
モ
import json
# First we'll define our types
type
Element = object
name: string
atomicNumber: int
# Let's say this is the JSON we want to convert
let jsonObject = parseJson("""{"name": "Carbon", "atomicNumber": 6}""")
let element = to(jsonObject, Element)
# This will print Carbon
echo element.name
# This will print 6
echo element.atomicNumber
YK
P
proc `*` *(a, b: Dollars): Dollars {.borrow.}
proc `+` *(a, b: Dollars): Dollars {.borrow.}
a = 20.Dollars * 20.Dollars
K
YK
Б
YK
Б
モ
K
proc `*` *(a, b: Dollars): Dollars {.borrow.}
proc `+` *(a, b: Dollars): Dollars {.borrow.}
a = 20.Dollars * 20.Dollars
YK
YK
モ
K
Б
YK