Skip to content

Instantly share code, notes, and snippets.

@Nakilon
Created July 4, 2025 12:26
Show Gist options
  • Save Nakilon/6abe26600eff0187d8e836188b13358d to your computer and use it in GitHub Desktop.
Save Nakilon/6abe26600eff0187d8e836188b13358d to your computer and use it in GitHub Desktop.
self-currying
Config = lambda do
dir = nil
lambda do |_dir = nil|
dir ||= _dir
p dir
end
end.call
Config.()
Config.("asd")
Config.()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment