From 245f24890cd78304cf0fd397dda8e72b0a7fbe6b Mon Sep 17 00:00:00 2001 From: Xander Date: Tue, 8 Aug 2023 22:17:40 +0200 Subject: more refactoring and implemented exec_init --- lib/SATS/init.sats | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/SATS') diff --git a/lib/SATS/init.sats b/lib/SATS/init.sats index 69c6c9a..9fe8581 100644 --- a/lib/SATS/init.sats +++ b/lib/SATS/init.sats @@ -6,6 +6,9 @@ fun {vt:viewt@ype} uninitialized (v : opt(vt,false)): initializable vt fun {vt:viewt@ype} exec_void (r: ref(initializable vt)): void fun {vt:viewt@ype} exec_void$fwork (v : &vt): void +// function will also inialize if not yet initalized +fun {vt:viewt@ype} exec_init (r: ref(initializable vt)): void + fun {vt:viewt@ype} {a: t@ype} exec (r: ref(initializable vt)): a fun {vt:viewt@ype} {a: t@ype} exec$fwork (v : &vt): a -- cgit v1.2.3