aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/list.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-05-22 00:52:15 +0000
committerdos-reis <gdr@axiomatics.org>2013-05-22 00:52:15 +0000
commit8ff37e0a47d82acde264075f21e2260a6c1a8b79 (patch)
treec88b33b8434b323cf5586a74cfa6aedabbd3f356 /src/algebra/list.spad.pamphlet
parent4d2e40994f313341a18c6a488826e5c79ed0ee6b (diff)
downloadopen-axiom-8ff37e0a47d82acde264075f21e2260a6c1a8b79.tar.gz
* algebra/aggcat.spad.pamphlet (ShallowlyMutableAggregate): Extend
Aggregate only. Adjust users. (BagAggregate): Explicitly extend HomogeneousAggregate. (AssociationListAggregate): Extend ShallowlyMutableAggregate.
Diffstat (limited to 'src/algebra/list.spad.pamphlet')
-rw-r--r--src/algebra/list.spad.pamphlet7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/algebra/list.spad.pamphlet b/src/algebra/list.spad.pamphlet
index 2bf3a01d..82a2cc73 100644
--- a/src/algebra/list.spad.pamphlet
+++ b/src/algebra/list.spad.pamphlet
@@ -478,6 +478,7 @@ AssociationList(Key:SetCategory, Entry:SetCategory):
Rep := Reference List Pair
dictionary() == ref empty()
+ dictionary l == ref l
empty() == dictionary()
empty? t == empty? deref t
entries(t:%):List(Pair) == deref t
@@ -507,10 +508,6 @@ AssociationList(Key:SetCategory, Entry:SetCategory):
if not empty?(l) then s := concat(s, ", ")$String
concat(s, " \right]")$String
--- assoc(k, l) ==
--- (r := find(#1.key=k, l)) case "failed" => "failed"
--- r
-
assoc(k, t) ==
for r in deref t repeat
k = r.key => return just r
@@ -542,7 +539,7 @@ AssociationList(Key:SetCategory, Entry:SetCategory):
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
--- Copyright (C) 2007-2010, Gabriel Dos Reis.
+-- Copyright (C) 2007-2013, Gabriel Dos Reis.
-- All rights reserved.
--
--Redistribution and use in source and binary forms, with or without