Skip to content

Instantly share code, notes, and snippets.

@egisatoshi
Last active August 29, 2015 14:01
Show Gist options
  • Save egisatoshi/b1a8f5a2746420105c03 to your computer and use it in GitHub Desktop.
Save egisatoshi/b1a8f5a2746420105c03 to your computer and use it in GitHub Desktop.
Last login: Mon May 12 19:57:49 on console
USER-no-iMac:~ user$ ruby --version
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]
USER-no-iMac:~ user$ sudo gem install egison
Password:
Fetching: egison-0.0.2.gem (100%)
Successfully installed egison-0.0.2
Parsing documentation for egison-0.0.2
Installing ri documentation for egison-0.0.2
1 gem installed
USER-no-iMac:~ user$ irb
irb(main):001:0> require 'egison'
=> true
irb(main):002:0> match_all([1, 2, 3]) do
irb(main):003:1* with(List.(*_hs, _x, *_ts)) do
irb(main):004:2* [hs, x, ts]
irb(main):005:2> end
irb(main):006:1> end
=> [[[], 1, [2, 3]], [[1], 2, [3]], [[1, 2], 3, []]]
irb(main):007:0>
@xyx-is
Copy link

xyx-is commented May 12, 2014

[xyx@localhost ruby]$ uname -a
Linux localhost.localdomain 3.13.10-200.fc20.i686 #1 SMP Mon Apr 14 21:00:56 UTC 2014 i686 i686 i386 GNU/Linux
[xyx@localhost ruby]$ ruby --version
ruby 2.1.1p76 (2014-02-24 revision 45161) [i686-linux]
[xyx@localhost ruby]$ irb --version
irb 0.9.6(09/06/30)
[xyx@localhost ruby]$ gem install egison
Fetching: egison-0.0.2.gem (100%)
Successfully installed egison-0.0.2
1 gem installed
[xyx@localhost ruby]$ irb
irb(main):001:0> require 'egison'
=> true
irb(main):002:0> match_all([1, 2, 3]){ with(List.(_a, b, *)) { a } }
NoMethodError: undefined method quantified' for true:TrueClass from /home/xyx/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/egison-0.0.2/lib/egison/core.rb:110:inmatch'
from /home/xyx/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/egison-0.0.2/lib/egison/core.rb:60:in process' from /home/xyx/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/egison-0.0.2/lib/egison/core.rb:37:inprocess'
from /home/xyx/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/egison-0.0.2/lib/egison/core.rb:30:in match' from /home/xyx/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/egison-0.0.2/lib/egison/core.rb:232:inwith'
from (irb):2:in block in irb_binding' from /home/xyx/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/egison-0.0.2/lib/egison/core.rb:345:ininstance_eval'
from /home/xyx/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/egison-0.0.2/lib/egison/core.rb:345:in match_all' from (irb):2 from /home/xyx/.rbenv/versions/2.1.1/bin/irb:11:in

'
irb(main):003:0> match_all([1, 2, 3]){ with(List.(_a, _b)) { a } }
=> []
irb(main):004:0> match_all([1, 2, 3]){ with(List.(_a, b, *)) { a } }
=> []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment