RosettaCodeData/Task/Higher-order-functions/Julia/higher-order-functions-1.jl
2024-10-16 18:07:41 -07:00

5 lines
114 B
Julia

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