func IsTruthy(v core.Any) bool {
	if IsNil(v) {
		return false
	}
	rv := reflect.ValueOf(v)
	if rv.Kind() == reflect.Bool {
		return rv.Bool()
	}
	return true
}
IsTruthy returns true if the value has a logical vale of `true`.
package builtin
import (
	"fmt"
	"math"
	"reflect"
	"strconv"
	"github.com/spy16/slurp/core"
)
var (
	_ core.Any = Nil{}
	_ core.Any = Int64(0)
	_ core.Any = Float64(1.123123)
	_ core.Any = Bool(true)
	_ core.Any = Char('∂')
	_ core.Any = String("specimen")
	_ core.Any = Symbol("specimen")
	_ core.Any = Keyword("specimen")
	_ core.Comparable = Int64(0)
	_ core.Comparable = Float64(0)
	_ core.EqualityProvider = Nil{}
	_ core.EqualityProvider = Bool(false)
	_ core.EqualityProvider = Char('a')
	_ core.EqualityProvider = String("specimen")
	_ core.EqualityProvider = Symbol("specimen")
	_ core.EqualityProvider = Keyword("specimen")
)
type Nil struct{}
func (Nil) SExpr() (string, error) { return "nil", nil }
func (Nil) Equals(other core.Any) (bool, error) { return IsNil(other), nil }
func (Nil) String() string { return "nil" }
type Int64 int64
func (i64 Int64) SExpr() (string, error) { return i64.String(), nil }
func (i64 Int64) Comp(other core.Any) (int, error) {
	if n, ok := other.(Int64); ok {
		switch {
		case i64 > n:
			return 1, nil
		case i64 < n:
			return -1, nil
		default:
			return 0, nil
		}
	}
	return 0, core.ErrIncomparable
}
func (i64 Int64) String() string { return strconv.Itoa(int(i64)) }
type Float64 float64
func (f64 Float64) SExpr() (string, error) { return f64.String(), nil }
func (f64 Float64) Comp(other core.Any) (int, error) {
	if n, ok := other.(Float64); ok {
		switch {
		case f64 > n:
			return 1, nil
		case f64 < n:
			return -1, nil
		default:
			return 0, nil
		}
	}
	return 0, core.ErrIncomparable
}
func (f64 Float64) String() string {
	if math.Abs(float64(f64)) >= 1e16 {
		return fmt.Sprintf("%e", f64)
	}
	return fmt.Sprintf("%f", f64)
}
type Bool bool
func (b Bool) SExpr() (string, error) { return b.String(), nil }
func (b Bool) Equals(other core.Any) (bool, error) {
	val, ok := other.(Bool)
	return ok && (val == b), nil
}
func (b Bool) String() string {
	if b {
		return "true"
	}
	return "false"
}
type Char rune
func (char Char) SExpr() (string, error) {
	return fmt.Sprintf("\\%c", char), nil
}
func (char Char) Equals(other core.Any) (bool, error) {
	val, isChar := other.(Char)
	return isChar && (val == char), nil
}
func (char Char) String() string { return fmt.Sprintf("\\%c", char) }
type String string
func (str String) SExpr() (string, error) { return str.String(), nil }
func (str String) Equals(other core.Any) (bool, error) {
	otherStr, isStr := other.(String)
	return isStr && (otherStr == str), nil
}
func (str String) String() string { return fmt.Sprintf("\"%s\"", string(str)) }
type Symbol string
func (sym Symbol) SExpr() (string, error) { return string(sym), nil }
func (sym Symbol) Equals(other core.Any) (bool, error) {
	otherSym, isSym := other.(Symbol)
	return isSym && (sym == otherSym), nil
}
func (sym Symbol) String() string { return string(sym) }
type Keyword string
func (kw Keyword) SExpr() (string, error) { return kw.String(), nil }
func (kw Keyword) Equals(other core.Any) (bool, error) {
	otherKW, isKeyword := other.(Keyword)
	return isKeyword && (otherKW == kw), nil
}
func (kw Keyword) String() string { return fmt.Sprintf(":%s", string(kw)) }
func IsNil(v core.Any) bool {
	if v == nil {
		return true
	}
	_, isNilType := v.(Nil)
	return isNilType
}