hellerve
|
e54ead1922
|
all: various sumtype fixes
- add get-maybe to Map
- add tests
- fix emitter error on ref types
|
2019-02-13 11:46:20 +01:00 |
|
hellerve
|
66c31d524c
|
core: simplify String.hash
|
2019-01-16 17:48:34 +01:00 |
|
Erik Svedäng
|
de1439c927
|
Merge pull request #368 from opqdonut/map-set-all
Set.all?, Map.all? and Map.=
|
2018-12-20 14:29:39 +01:00 |
|
Joel Kaasinen
|
5bb17b82ee
|
core/Map.carp: Map.all? and Map.=
|
2018-12-18 16:17:08 +02:00 |
|
Joel Kaasinen
|
7aae7d55bd
|
core/Map.carp: Set.all?
|
2018-12-18 15:58:58 +02:00 |
|
Joel Kaasinen
|
7f7f7c26b1
|
core/Map.carp: get-with-default
nice for types with no (zero) defined
|
2018-12-18 14:57:02 +02:00 |
|
Joel Kaasinen
|
a5e46dc71b
|
core/Map.carp: set operations
- equality
- subset
- intersection
- union
- difference
|
2018-12-13 08:33:42 +02:00 |
|
Joel Kaasinen
|
8020434ace
|
core/Map.carp: hash for Pair
Algorithm from https://stackoverflow.com/questions/1646807/quick-and-simple-hash-code-combinations
|
2018-12-11 17:37:51 +02:00 |
|
Joel Kaasinen
|
31824bcadb
|
Map.to-array and Set.to-array functions, equality for non-ref Pairs
|
2018-12-07 21:28:36 +02:00 |
|
Joel Kaasinen
|
2fd86736d6
|
core/Map.carp: use Bucket.find in Map.update[-with-default]
to not look up the key in the bucket twice
|
2018-12-07 18:05:09 +02:00 |
|
Joel Kaasinen
|
23e2252d01
|
core/Map.carp: also make Bucket.shrink take a non-ref argument
for consistency
|
2018-12-07 17:48:07 +02:00 |
|
Joel Kaasinen
|
f0e62cccea
|
core/Map.carp: Bucket.{get-idx,set-idx,push-back} helpers
in addition, make mutating Bucket operations take a non-ref argument
for consistency
|
2018-12-07 17:45:19 +02:00 |
|
Joel Kaasinen
|
df1b29fb74
|
core/Map.carp: factor out Bucket.find
|
2018-12-07 17:08:55 +02:00 |
|
Joel Kaasinen
|
10a9de39da
|
core/Map.carp: Map.update and Map.update-with-default functions
|
2018-12-07 13:41:17 +02:00 |
|
Joel Kaasinen
|
845fd6409e
|
core/Map.carp: Map.endo-map function
|
2018-12-07 13:27:48 +02:00 |
|
Joel Kaasinen
|
f28b0f9197
|
core/Map.carp: Set.reduce function
|
2018-12-07 13:17:58 +02:00 |
|
Joel Kaasinen
|
1b298c6e91
|
core/Map.carp: documentation updates
|
2018-12-07 13:11:05 +02:00 |
|
Joel Kaasinen
|
afd7dec6a8
|
core/Map.carp: Map.vals and Map.keys functions
|
2018-12-07 13:04:18 +02:00 |
|
Joel Kaasinen
|
6cf17937d7
|
core/Map.carp: add Map.kv-reduce function
|
2018-12-07 12:55:27 +02:00 |
|
Joel Kaasinen
|
81ff5f82c3
|
use break in Bucket.put, remove unused Bucket.grow
|
2018-12-04 08:31:02 +02:00 |
|
Joel Kaasinen
|
a473b54e06
|
fix Map.put and Set.put
|
2018-12-03 20:45:23 +02:00 |
|
Joel Kaasinen
|
cfb61847cb
|
fix Map and Set behaviour for negative hash values
fixes #335
- add new Int.positive-mod function
- use it for Map and Set operations
- add tests
|
2018-12-01 18:01:02 +02:00 |
|
Erik Svedäng
|
1dc8b536fc
|
Deftype generates 'update' functions that expect refs to functions too.
|
2018-11-14 14:21:12 +01:00 |
|
Erik Svedäng
|
fe55144273
|
Follow convention of passing lambdas as refs as default.
|
2018-11-14 14:09:43 +01:00 |
|
hellerve
|
e887a5633b
|
core: remove put! and remove! from map and set
|
2018-10-31 13:42:05 +01:00 |
|
hellerve
|
16e2d7fb85
|
core: add remove! and put! and make reduce take ownership
|
2018-10-31 11:33:29 +01:00 |
|
hellerve
|
1c6884b93b
|
core: fix docs for map and set
|
2018-08-25 19:51:27 +02:00 |
|
hellerve
|
91075cc613
|
core: remove pair from bucket for sets (less memory overhead)
|
2018-08-25 14:18:37 +02:00 |
|
hellerve
|
e27ee09f78
|
core: remove entry type from map, use Pair
|
2018-08-25 13:56:58 +02:00 |
|
hellerve
|
012f048f7f
|
core: change from str to prn in map stringification
|
2018-08-07 09:32:35 +02:00 |
|
hellerve
|
d95c28ad5d
|
core: fixed set and tests
|
2018-08-07 09:32:32 +02:00 |
|
hellerve
|
52b2eef832
|
core: miscellaneous fixes
|
2018-08-07 09:30:37 +02:00 |
|
hellerve
|
db3848f639
|
core: documet map module
|
2018-06-13 17:14:39 +02:00 |
|
hellerve
|
2e742a9c18
|
core: do not use Array in Map
|
2018-06-11 21:23:34 +02:00 |
|
hellerve
|
913e8e3892
|
core: add map
|
2018-06-11 20:50:54 +02:00 |
|