RosettaCodeData/Task/Higher-order-functions/Julia/higher-order-functions-1.julia
2023-07-01 13:44:08 -04:00

5 lines
114 B
Text

function foo(x)
str = x("world")
println("hello $(str)!")
end
foo(y -> "blue $y") # prints "hello blue world"