     [x y] (f ["A" "B"])
   """
   """x""", "A"
+
+  'higher-order use of constrained function'
+  """
+    Show (class [a]
+      show (fn [x] (: (Fn a String))))
+
+    show-string (instance (Show String)
+      show (fn [x] x))
+
+    f (fn [pair]
+      [(show a) (show b)]
+      [a b] pair)
+
+    apply (fn [m to]
+      (m to))
+
+    [x y] (apply f ["A" "B"])
+  """
+  """x""", "A"
   # The following doesn't work because the Collection type class specifies
   # that the constructor takes only one argument.
   #

          # })"""
          (irFunction
            name: (ctx.definitionName() if ctx.isAtSimpleDefinition())
            type: call.tea
            params: paramNames
            body: (join compiledWheres, [(jsReturn compiledBody)]))
            # (jsCall "λ#{paramNames.length}", [

      else
        (jsBinary "instanceof", exp, (validIdentifier symbol)))]

nameTranslate = (ctx, atom, symbol, type, arity) ->
  if atom.label is 'const'
    switch symbol
      when 'True' then 'true'
      when 'False' then 'false'
      else
        (jsAccess (validIdentifier symbol), "_value")
  else
    (irReference symbol, type, arity)

numericalCompile = (ctx, symbol) ->
  translation = if symbol[0] is '~' then (jsUnary "-", symbol[1...]) else symbol
