From 1ca77f60626666fba792db407dd11ea9b597d9cf Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 16 Aug 2022 09:19:33 +0200 Subject: binary operators and more stuff --- src/map.hff | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/map.hff') diff --git a/src/map.hff b/src/map.hff index f97ea7e..700c553 100644 --- a/src/map.hff +++ b/src/map.hff @@ -100,8 +100,10 @@ struct Map { } - fn put(self *Map, key K, val V) void { - *self->get_slot(key) = val; + fn put(self *Map, key K, val V) *V { + let slot = self->get_slot(key); + *slot = val; + return slot; } fn clear(self *Map) void { -- cgit v1.2.3