lake/symtable.c
Sami Samhuri 54831a34fa added eval and apply, lambdas, other goodies
- add booleans, dotted lists, functions
- proper lexical scope
- special forms: define, set!, and, or, quote, lambda
- added some basic list manipulations
- print functions and dotted lists
- removed nil
- more robust in general
2011-04-20 01:38:53 -07:00

27 lines
428 B
C

/**
* symtable.c
* Lake Scheme
*
* Copyright 2011 Sami Samhuri
* MIT License
*
*/
#include <glib.h>
#include "lake.h"
#include "symtable.h"
static guint _sym_hash(gconstpointer key)
{
return SYM_HASH(SYM(key));
}
static gboolean _sym_eq(gconstpointer a, gconstpointer b)
{
return BOOL_VAL(sym_eq(SYM(a), SYM(b)));
}
GHashTable *symtable_make(void)
{
return g_hash_table_new(_sym_hash, _sym_eq);
}