smullyan 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54c284e10e19e7e4904cf00787a48bd0b0263e36aa570c40140972612dec769e
4
- data.tar.gz: '0275814586bb58cc526675df06aba5c16d088ef8f3b957e811885d6dba8d7bc8'
3
+ metadata.gz: 3910bf99fff9838c5d4b545b1eea51db6a3b600bca46c2e885f8a7206d73534e
4
+ data.tar.gz: 891d205739931071eaa7d1513f2204dc118d908cd79b98454a08784566ad4ce0
5
5
  SHA512:
6
- metadata.gz: 21dfbf121b9a84b114a39c875f5b08fd3a38d37c0b7976facce2782f81cc3bfd585d5028208eb714b46fdd38bdbf19a2f9396c189e64abba162a72235e7af000
7
- data.tar.gz: 30b2c7fac3e4ea3f879bf4ed7781f9e58cb5f502df2409ac2bd2cd609ae89095b0319f31f4d23a474632febb115cf7b79e950ddcd7639300b9a54c16d47bc84a
6
+ metadata.gz: 13ad3e2f46cc333691da7eb378e4610e66a4943b737192dfcc01f48572eb7e30ebde2db894a3275e35cd3c555a4be766f7ba001bed5be9b9ff519f4b02535806
7
+ data.tar.gz: 5b2fd590747a7a1cb9d295804560e01446f2d684edaacf00510500e24da3bafcc8b63864abb249424d79dd46aaf8d3712b81ef73ef6b5326f04e5cdb8cbe53e7
@@ -1,13 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative 'starling'
4
+ require_relative 'kestrel'
5
+
3
6
  module Smullyan
4
7
  module Birds
5
8
  # The Identity bird - returns its argument unchanged
6
9
  # Identity x = x
7
- Identity = ->(x) { x }
10
+
11
+ # I is SKK
12
+ I_derived = S.(K).(K)
13
+
14
+ I_direct = ->(x) { x }
8
15
 
9
16
  # Traditional combinator names
10
- I = Identity # I combinator
17
+ Identity = I_derived # I combinator
18
+ I = Identity
11
19
  Idiot = Identity # Alternative name from Smullyan's book
12
20
  end
13
21
  end
@@ -0,0 +1,16 @@
1
+ # # frozen_string_literal: true
2
+
3
+ module Smullyan
4
+ module Birds
5
+ # phoenix (or phi) applies takes 4 arguments in total
6
+ # it applies the fourth argument to the 2nd & 3rd, and then
7
+ # applies the results of those to the first
8
+ # phi xyzw = x(yw)(zw)
9
+ Phoenix = B.(B.(S)).(B)
10
+
11
+ Phoenix_direct = ->(x) { ->(y) { ->(z) { ->(w) { x.(y.(w)).(z.(w)) }}}}
12
+
13
+ Phi = Phoenix
14
+ Φ = Phoenix
15
+ end
16
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Smullyan
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.4'
5
5
  end
data/lib/smullyan.rb CHANGED
@@ -13,6 +13,7 @@ require_relative 'smullyan/birds/why'
13
13
  require_relative 'smullyan/birds/lark'
14
14
  require_relative 'smullyan/birds/finch'
15
15
  require_relative 'smullyan/birds/robin'
16
+ require_relative 'smullyan/birds/phoenix'
16
17
  require_relative 'smullyan/configurable_birds'
17
18
 
18
19
  module Smullyan
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smullyan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phil Crissman
@@ -87,6 +87,7 @@ files:
87
87
  - lib/smullyan/birds/kestrel.rb
88
88
  - lib/smullyan/birds/lark.rb
89
89
  - lib/smullyan/birds/mockingbird.rb
90
+ - lib/smullyan/birds/phoenix.rb
90
91
  - lib/smullyan/birds/robin.rb
91
92
  - lib/smullyan/birds/starling.rb
92
93
  - lib/smullyan/birds/warbler.rb