Permalink
Browse files

NORMAL even more feature complete. Use tested

  • Loading branch information...
1 parent 265e1f0 commit 007cf2f857f80240cbc96b9fd9aebb6c529c45a1 @VincentToups committed Apr 16, 2012
Showing with 27 additions and 1 deletion.
  1. +2 −0 cellArray.m
  2. +7 −0 minusgreaterThan.m
  3. +6 −0 parenlab.el
  4. +5 −1 progn.m
  5. +4 −0 readme.md
  6. +2 −0 structAccess.m
  7. +1 −0 todo.org
View
@@ -0,0 +1,2 @@
+function r=cellArray(varargin)
+r = varargin;
View
@@ -0,0 +1,7 @@
+function [r] = minusgreaterThan(struct, varargin)
+r = struct;
+for i = ((1):(length(varargin)))
+ key = varargin{i};
+ r = structAccess(r, key);
+end
+;
View
@@ -393,3 +393,9 @@ with the transcoded code."
(setq r 1)
(for x varargin
(setq r (* r ({} x 1)))))
+
+(pl:defun (r) -> (struct varargin)
+ (setq r struct)
+ (for i (: 1 (length varargin))
+ (setq key ({} varargin i))
+ (setq r (struct-access r key))))
View
@@ -4,6 +4,10 @@
for vi=1:(length(varargin)-1)
item=varargin{vi};
- evalin('caller',item);
+ if ischar(item)
+ evalin('caller',item);
+ else
+ item();
+ end
end
val = evalin ('caller',item);
View
@@ -1,6 +1,8 @@
Parenlab
========
+(Note: parenlab depends on [shadchen-el][] and requires Emacs).
+
Parenlab is a dirty cross compiler which forces an s-expression front
end onto Matlab, a bit like parenscript for Javascript.
@@ -48,3 +50,5 @@ user can define new macros that operate at the level of the
s-expression representation of Matlab code. Underneath, the generated
code has access to all the powerful analytic and plotting abilities of
Matlab (or Octave, if you are running it.)
+
+[shadchen-el]:https://github.com/VincentToups/shadchen-el
View
@@ -0,0 +1,2 @@
+function r = structAccess(s,f)
+r = s.(f);
View
@@ -0,0 +1 @@
+* implement fully functional let form using lambda lifting.

0 comments on commit 007cf2f

Please sign in to comment.