Sha256: 9020d411ba1008c35d0b86468f0be055664cd4d6b9080b2e88fb89d12ec52d65
Contents?: true
Size: 580 Bytes
Versions: 21
Compression:
Stored size: 580 Bytes
Contents
module Person = { type t = Teacher | Director | Student(string) let greeting = person => switch person { | Teacher => "Hey Professor!" | Director => "Hello Director." | Student("Richard") => "Still here Ricky?" | Student(other) => "Hey, " ++ other ++ "." } } module Button = { @react.component let make = (~count: int, ~onClick) => { let times = switch count { | 1 => "once" | 2 => "twice" | n => Belt.Int.toString(n) ++ " times" } let msg = "Click me " ++ times <button onClick> {msg->React.string} </button> } }
Version data entries
21 entries across 21 versions & 2 rubygems