Post Scarcity
A prototype for a post scarcity programming environment
Loading...
Searching...
No Matches
equal.h
Go to the documentation of this file.
1/**
2 * equal.h
3 *
4 * Checks for shallow and deep equality
5 *
6 * (c) 2017 Simon Brooke <simon@journeyman.cc>
7 * Licensed under GPL version 2.0, or, at your option, any later version.
8 */
9
10#include <math.h>
11#include <stdbool.h>
12
13#include "consspaceobject.h"
14
15#ifndef __equal_h
16#define __equal_h
17
18/**
19 * size of buffer for assembling strings. Likely to be useful to
20 * read, too.
21 */
22#define STRING_SHIPYARD_SIZE 1024
23
24/**
25 * Shallow, and thus cheap, equality: true if these two objects are
26 * the same object, else false.
27 */
28bool eq( struct cons_pointer a, struct cons_pointer b );
29
30/**
31 * Deep, and thus expensive, equality: true if these two objects have
32 * identical structure, else false.
33 */
34bool equal( struct cons_pointer a, struct cons_pointer b );
35
36#endif
An indirect pointer to a cons cell.
bool equal(struct cons_pointer a, struct cons_pointer b)
Deep, and thus expensive, equality: true if these two objects have identical structure,...
Definition equal.c:332
bool eq(struct cons_pointer a, struct cons_pointer b)
Shallow, and thus cheap, equality: true if these two objects are the same object, else false.
Definition equal.c:28