File: block-01.typ

package info (click to toggle)
haskell-typst 0.5.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 16,564 kB
  • sloc: haskell: 8,314; xml: 32; makefile: 6
file content (25 lines) | stat: -rw-r--r-- 397 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Nothing evaluates to none.
#test({}, none)

// Let evaluates to none.
#test({ let v = 0 }, none)

// Evaluates to single expression.
#test({ "hello" }, "hello")

// Evaluates to string.
#test({ let x = "m"; x + "y" }, "my")

// Evaluated to int.
#test({
  let x = 1
  let y = 2
  x + y
}, 3)

// String is joined with trailing none, evaluates to string.
#test({
  type("")
  none
}, "string")