libraryuserlibs/Greetings.xtl

Greetings: a library with a private name. h:n_ame is file-private, so it is used here but cannot be imported; g_reet is exported, and takes the greeting from the program that calls it. Import it with an alias of your choice: "g:" u_se< "Greetings" (it is found in userlibs/).

source

ʰn̲ame : Unit -> Char

function (private) · line 8

The name a greeting is addressed to, the logo drawn (niladic: call it with @).

ʰn̲ame ← { @ → "X̲ᵉTᵃL" }                       ⍝ private
Used in: ˡg̲reet

ˡg̲reet : Char -> Char

function · line 15

The greeting g, given by the caller, followed by the name: monadic, ᵍg̲reet "hi".

      ᵍ⁼u̲se< "Greetings"
      ᵍg̲reet "hi"
hi X̲ᵉTᵃL
ˡg̲reet ← { g → g c̲at " " c̲at ʰn̲ame @ }         ⍝ monadic: the greeting