func evalIf(predicate, consequent, alternative types.Expression, env *Env) (types.Expression, error) {
	bb, err := evalPredicate(predicate, env)
	if err != nil {
		return nil, err
	}
	if bb {
		return Eval(consequent, env)
	}
	return Eval(alternative, env)
}
evalIf evaluates if-clause.
predicate consequent alternative
like, (if (ok? yeah) (go) (not go))
package eval
import (
	"errors"
	"fmt"
	"github.com/suzuken/gigue/lexer"
	"github.com/suzuken/gigue/parser"
	"github.com/suzuken/gigue/types"
	"io"
	"os"
	"path/filepath"
	"strings"
)
func evalDefine(exps []types.Expression, env *Env) (types.Expression, error) {
	if len(exps) < 2 {
		return nil, errors.New("define clause must have symbol and body")
	}
	switch tt := exps[1].(type) {
	case types.Symbol:
		value, err := Eval(exps[2], env)
		if err != nil {
			return nil, err
		}
		env.Put(tt, value)
		return nil, nil
	case []types.Expression:
		if len(tt) < 2 {
			return nil, errors.New("define statament must have more than 2 words")
		}
		caddr, ok := tt[0].(types.Symbol)
		if !ok {
			return nil, errors.New("(define x) of x should be symbol")
		}
		env.Put(caddr, Lambda{tt[1:], exps[2], env})
		return nil, nil
	default:
		return nil, nil
	}
}