packages feed

tilia-0.2.0.0: corpora/vendored/expression/operator/tighter-chain-first-a-step-further-in-out.hs

module Kiln.Firing where

-- A tighter chain written first puts its operators a step further in than
-- the looser ones after it where a tighter chain follows one of them, as
-- the later chain does.
temperature :: Int -> Int -> Int -> Int
temperature base rise hold =
  base
      * rise
    + hold
      * 2
    + 1

-- Where no chain follows the looser operator, the tighter chain stays at
-- its column, and so it does before a ($), whatever follows it, as in a
-- pipeline.
outline :: [String] -> String
outline lines' =
  unlines
    . map trim
    . filter (not . null)
    $ lines'

indented :: [String] -> String
indented lines' =
  unlines
    . map ("  " ++)
    $ header ++ lines'