LearnBoost/stylus — pull request #1342 by sbking (2014-01-14 20:42:06+00:00)
Title: Fix type() BIF to return 'list' for expression lists

This fixes some of the behavior described in #1333. The type BIF currently is not a raw function, so it will return the type of the first node in a list:

list = 1 foo "bar"

type(list) // => "unit"

This makes it difficult to check if a value is an object or a list of objects:

hash = {foo: 1, bar: 2, baz: 3}
hash-list = {foo: 1} {bar: 2} {baz: 3}

type(hash) // => "object"
type(hash-list) // => "object"

This commit makes the operator behave as expected:

type(list) // => "list"
type(hash-list) // => "list"