Skip to main content
Post Undeleted by Dennis
deleted 241 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

GolfScript by Ilmari Karonen

:a;
:b;

"#{
    def lookup(name)
        eval('$_' + ($var_lookup[name] - 3).to_s).val
    end

   var gpush'add', GintGblock.new(lookup('a')'gpush gpop + lookup('b')gpop')
 }";
add

I have no idea why I need the - 3, but I do.

Try it online!Try it online!

GolfScript by Ilmari Karonen

:a;
:b;

"#{
    def lookup(name)
        eval('$_' + ($var_lookup[name] - 3).to_s).val
    end

    gpush Gint.new(lookup('a') + lookup('b'))
 }";

I have no idea why I need the - 3, but I do.

Try it online!

GolfScript by Ilmari Karonen

"#{var 'add', Gblock.new('gpush gpop + gpop')}";
add

Try it online!

Post Deleted by Dennis
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

GolfScript by Ilmari Karonen

:a;
:b;

"#{
    def lookup(name)
        eval('$_' + ($var_lookup[name] - 3).to_s).val
    end

    gpush Gint.new(lookup('a') + lookup('b'))
}";

I have no idea why I need the - 3, but I do.

Try it online!