You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/syntax-of-a-function-call.qd
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,18 @@ You can append additional arguments to any function in the chain. Just keep in m
98
98
99
99
Many core functions are designed to be called in a chain, for example [`None` operations](none.qd#examples).
100
100
101
+
### Identity function
102
+
103
+
A nameless function call uses the syntax `.{value}`, omitting the function name entirely. It acts as an identity function, passing its argument through unchanged. This is especially useful as a starting point for a chain when you want to begin with a literal value:
104
+
105
+
.examplemirror
106
+
.{30}::multiply {2}
107
+
108
+
.examplemirror
109
+
.{Hello}::text variant:{smallcaps}
110
+
111
+
Without the nameless call, you would need to either use a variable or nest the calls manually.
112
+
101
113
## Tight function calls
102
114
103
115
A function call must normally be surrounded by whitespace, a symbol, or the beginning or end of a line. This means that a call directly adjacent to a word character is not recognized:
0 commit comments