8 lines
199 B
Text
8 lines
199 B
Text
def foo( filter ):
|
|
("world" | filter) as $str
|
|
| "hello \($str)" ;
|
|
|
|
# blue is defined here as a filter that adds blue to its input:
|
|
def blue: "blue \(.)";
|
|
|
|
foo( blue ) # prints "hello blue world"
|