Skip to content

Commit 30261f0

Browse files
committed
refactor:Easier to read code / better layout.
1 parent f2acc94 commit 30261f0

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

lib/CortexJS.rakumod

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ our sub resources($key) {
88
%?RESOURCES{$key}
99
}
1010

11+
#==========================================================
12+
# Computation engine object
13+
#==========================================================
14+
1115
my $ce = Whatever;
1216

1317
sub start-ce() {
@@ -23,6 +27,11 @@ sub start-ce() {
2327
}
2428
}
2529

30+
# Clean up
31+
END {
32+
$ce.close if $ce;
33+
}
34+
2635
#==========================================================
2736
# LaTeX functions
2837
#==========================================================
@@ -153,11 +162,4 @@ our sub unwrap-symbolic-subs() {
153162
return unless @wrappers;
154163
([&simplify, &evaluate, &N, &expand, &expand-all, &expandAll, &factor, &solve] Z @wrappers).map({ $_.head.unwrap($_.tail) });
155164
@wrappers = Empty
156-
}
157-
158-
#==========================================================
159-
# Cleanup
160-
#==========================================================
161-
END {
162-
$ce.close if $ce;
163165
}

0 commit comments

Comments
 (0)