-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
881999b
commit 335edd2
Showing
11 changed files
with
99 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
const validated = require('../validated'); | ||
const safe = require('../safe'); | ||
const at_term = require('./at-term'); | ||
|
||
/** | ||
* Attribute that catches {@link ErFailure} and throws {@link ErError}. | ||
* @param {object} origin - Original attribute | ||
* @return {Object} - Attribute | ||
*/ | ||
const at_safe = function(origin) { | ||
return { | ||
return at_term({ | ||
put: function(object) { | ||
return origin.put(object) | ||
origin.put(object) | ||
}, | ||
get: function() { | ||
return validated(() => safe(origin.get())) | ||
}, | ||
copy: function(rho) { | ||
return at_safe(origin.copy(rho)) | ||
} | ||
} | ||
}) | ||
} | ||
|
||
module.exports = at_safe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Attribute as φTerm. | ||
* @param {Object} origin - Original attribute | ||
* @return {Object} - Attribute with default φTerm | ||
*/ | ||
const at_term = function(origin) { | ||
return { | ||
...origin, | ||
φTerm: function() { | ||
return origin.get().φTerm() | ||
} | ||
} | ||
} | ||
|
||
module.exports = at_term |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
/** | ||
* Attribute and asset names. | ||
* @type {{PHI: string, DELTA: string, SIGMA: string, RHO: string, VTX: string, LAMBDA: string}} | ||
* @type {{PHI: string, DELTA: string, SIGMA: string, RHO: string, VTX: string, LAMBDA: string, EMPTY: string}} | ||
*/ | ||
module.exports = { | ||
PHI: 'φ', | ||
DELTA: 'Δ', | ||
LAMBDA: 'λ', | ||
RHO: 'ρ', | ||
EMPTY: 'Ø' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
335edd2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puzzle
3-eac6ec12
disappeared fromeo2js-runtime/src/objects/org/eolang/as_phi.js
), that's why I closed #40. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.