If Something Is Not A List In Haskell

前端 未结 3 555
轻奢々
轻奢々 2020-12-20 23:35

How do i check if an object in Haskell is not a list? for instance i want to know if
let a = 55, a is a list or just a number?

3条回答
  •  我在风中等你
    2020-12-21 00:14

    Haskell is a statically typed, i.e. you know at compile time whether an identifier denotes something of type [Int] or of Int.

提交回复
热议问题