Color theme
0 day streak0 XPP1
HaskellLearn mode
MISSION 1 OF 1

Classify the kiln stage

0 XP earned
Haskell track: MasterMission: IntermediateGuardsOrdered conditionsRange boundaries
Before you start this master track

Functions and immutable lists. Read type signatures, pattern matching, and guards.

Guided code reading and debugging. Runnable coding challenges are available in JavaScript, Python, and SQL.

x
0 / 2 challenges
LEARN THE CONCEPT

Understand it, then try it.

Guards choose a result by checking conditions from top to bottom. The first true guard wins. This pottery helper labels temperatures below 600 as warm, temperatures from 600 up to but excluding 1000 as bisque, and higher temperatures as glaze. otherwise supplies the final fallback.

Main.hs
kilnStage :: Int -> StringkilnStage temperature  | temperature < 600 = "warm"  | temperature < 1000 = "bisque"  | otherwise = "glaze"main :: IO ()main = putStrLn (kilnStage 820)

Each mission is a separate Haskell 2010 program using the standard Prelude. Save one as Main.hs and run with runghc Main.hs. String output uses putStrLn; numeric lists use print.

Track the values line by line. Predict the result before running this example in your own editor.