3.2 Snippet Systems🔗ℹ
3.2.1 Snippet Systems in General🔗ℹ
Struct-like operations which construct and deconstruct a
selectable? value that represents a value that has not been selected to be processed as part of a collection traveral.
Two unselected values are equal? if they contain equal? elements.
Struct-like operations which construct and deconstruct a
selectable? value that represents a value that has indeed been selected to be processed as part of a collection traveral.
Two selected values are equal? if they contain equal? elements.
Returns whether the given value is a possibly-selected value, which is an arbitrary value that may or may not have been selected to be processed as part of a collection traversal. A possibly-selected value is represented by either an
unselected? value or a
selected? value.
(TODO: Consider renaming selectable? to possibly-selected?.)
Returns a contract that recognizes a
selectable? value where the value abides by
unselected/c if it’s unselected or by
selected/c if it’s selected.
The resulting contract has the same contract obstinacy as the most obstinate of the given contracts.
Returns a
selectable? value similar to the given one, but with its selected element (if any) transformed by the given function.
See snippet-format-sys? for a similar bundle of operations which allows the dimension system to be decided upon by the caller.
Returns the
snippet system that operates on the
shapes of the given
snippet system’s
hypersnippets. These shapes are hypersnippets of their own, and they have the same arrangement of
holes as the hypersnippets they’re the shapes of, but they don’t contain any content. They’re good for representing content-free areas where a hypersnippet’s content can be inserted, such as the holes of a fellow hypersnippet.
Returns a flat contract which recognizes any
hypersnippet of the given
snippet system if its
degree is strictly less than the given one, or if its degree is equal to the given one.
Returns a contract which recognizes any
hypersnippet of the given
snippet system if the values in its
holes abide by the given contracts. The contracts are given by a function
h-to-value/c that takes the hypersnippet
shape of a hole and returns a contract for values residing in that hole.
This design allows us to require the values in the holes to somehow fit the shapes of the holes they’re carried in. It’s rather common for the value contracts to depend on at least the degree of the hole, if not on its complete shape.
The resulting contract is at least as reticent as the given contract obstinacy. The given contracts must also be at least that reticent.
Returns a contract which recognizes any
hypersnippet of the given
snippet system if some of its
holes correspond with the holes of the given
shape hypersnippet
shape and if the values in those holes are somehow compatible with the values held in
shape’s holes.
To determine which holes from the subject will be compared to those in shape, the given check-subject-hv? is called for each of the subject’s holes, passing it the hole’s shape and the data value it carries. It’s expected to return a boolean indicating whether this hole should correspond to some hole in shape.
To determine if a value in the subject’s holes is compatible with a corresponding (same-shaped) hole in shape, the hvv-to-subject-v/c function is called, passing it the hole’s shape, the value carried in shape’s hole, and the value carried in the subject’s hole. It’s expected to return a contract, and the value in the subject’s hole is expected to abide by that contract.
The resulting contract is at least as reticent as the given contract obstinacy. The given contracts must also be at least that reticent.
Returns a flat contract which recognizes any
hypersnippet of the given
snippet system if its
holes of low enough
degree correspond with the holes of the given
shape hypersnippet
shape and if there are only
trivial? values in those holes. Only holes of degree less than the degree of
shape are constrained this way; other holes don’t have to coincide with holes of
shape, and they can have any contents.
This contract is fairly common because it’s the kind of compatibility that’s needed to concatenate hypersnippets (e.g. using snippet-sys-snippet-bind). It’s similar to joining two 3D polyhedra along a 2D face they share (and the 1D edges and 0D vertices of that face, which they also share).
Given a
hypersnippet shape, returns an content-free hypersnippet which has that shape. The result has carries all the same values in its
holes.
This operation can be inverted using snippet-sys-snippet->maybe-shape.
Checks whether a
hypersnippet is content-free, and if it is, computes the hypersnippet’s
shape.
The resulting shape, if any, carries all the same values in its holes.
This operation is invertible when it succeeds. The resulting shape, if any, can be converted back into a content-free hypersnippet by using snippet-sys-shape->snippet.
If possible, returns a
hypersnippet just like the given one but modified to have the given
degree.
The resulting hypersnippet, if any, has all the same content as the original and carries all the same values in its holes.
If the given degree is already the same as the given snippet’s degree, this operation succeeds (and returns a snippet equivalent to the original).
If the original snippet has nonzero degree, and if the given degree is greater than the snippet’s existing degree, this operation succeeds.
This operation is invertible when it succeeds. The resulting snippet, if any, can be converted back by calling snippet-sys-snippet-set-degree-maybe again with the snippet’s original degree.
Given a
hypersnippet shape, returns a content-free hypersnippet that fits into a
hole of that shape and has its own hole of the same shape. The resulting snippet has the given
degree, which must be high enough that a hole of shape
shape is allowed. The resulting snippet’s
shape-shaped hole carries the given data value, and its lower-degree holes carry the same data values carried by
shape’s holes.
The results of this operation are the identity elements of hypersnippet concatenation (snippet-sys-snippet-join). It’s the identity on both sides: Filling a hypersnippet’s hole with one of these hypersnippets and concatenating has no effect, and filling this one’s shape-shaped hole with another hypersnippet and concatenating has no effect either.
This operation can be inverted using snippet-sys-snippet-undone.
The results of this operation are always content-free, so they can be successfully converted to shapes by snippet-sys-snippet->maybe-shape.
Checks whether a
hypersnippet is an identity element of hypersnippet concatenation, and if it is, obtains three values: Its
degree, the
shape of
hole it interacts with in its role as an identity element, and the data value contained in its own hole of that shape.
The resulting hole shape, if any, carries all the same values in its holes that snippet carries in its low-degree holes.
This operation is invertible when it succeeds. The resulting shape, if any, can be converted back into a content-free hypersnippet by using snippet-sys-snippet-done.
(TODO: Consider renaming this to have "maybe" in the name, bringing it closer to snippet-sys-snippet->maybe-shape and snippet-sys-snippet-set-degree-maybe.)
Returns a
hypersnippet like the given one, but where the data value carried in each
hole has been selected for traversal in the sense of
selectable?.
Attempts to concatenate the given "prefix"
hypersnippet snippet to any selected "suffix" hypersnippets computed from the
hole data by the given selection-attempting data-transforming function
hv-to-splice.
The hv-to-splice function is invoked with the shape and data value of each hole of the prefix, possibly stopping partway through if at least one of the invocations returns (nothing). If any invocation returns (nothing), the overall result is (nothing). Otherwise, the concatenation proceeds successfully.
When an invocation of hv-to-splice is successful for some hole of degree N, the result is expected to be a selectable? value. If it’s unselected?, a corresponding hole with the unselected-value appears verbatim in the concatenation result (without the value being concatenated to the prefix hypersnippet). If it’s selected?, its selected-value is expected to be a "suffix" hypersnippet, and it’s concatenated into the prefix hypersnippet along the hole it’s carried by in the prefix. For this concatenation to work, the suffix hypersnippet is expected to have the same degree as the prefix, and its holes of degree less than N are expected to contain trivial? values and to correspond to the holes of the prefix’s hole. Any holes of degree not less than N become holes in the concatenated result.
This operation obeys higher-dimensional algebraic laws. We haven’t really figured out how to express these laws yet, but they seem to correspond to the category-theoretic notion that this operation performs whiskering of higher-dimensional cells along various dimensions at once. (TODO: Do at least a little better. This could be an ongoing effort, but ideally we would have something to show in the #:should-be-equal DSL that we use for other documentation of algebraic laws.)
Some of the lawfulness is a kind of associativity: If we first concatenate along some selected holes and then concatenate along some other holes that weren’t selected the first time, that’s the same as concatenating along all those holes at once. If a hole’s suffix is itself a concatenation of some suffix-prefix to some suffix-suffix, then it doesn’t matter whether we concatenate those two parts to form the suffix first or if we concatenate the prefix to the suffix-prefix and then concatenate the suffix-suffix last.
Some of the lawfulness is a kind of unitality: If the concatenation is being performed along a hole where either the prefix or the suffix is an identity element produced by snippet-sys-snippet-done for that hole shape, then the result resembles the other snippet. (When the prefix is the identity, the result is equal to the suffix. When the suffix is the identity, the result is the prefix, but with its data value in that hole replaced with the data value that would have been passed to snippet-sys-snippet-done when creating the suffix.)
Some of the lawfulness is associativity in a bird’s-eye-view form: If all the hv-to-splice results are selected suffixes, and if the prefix is content-free (in the sense that it can be converted to a shape by snippet-sys-snippet->maybe-shape), then the result is the same as performing multiple concatenations to concatenate the suffixes with each other. In this sense, content-free hypersnippets are like concatenation operations in their own right, possibly like the composition cells of an opetopic higher-dimensional weak category in category theory.
Attempts to use the data carried in the given
hypersnippet shape to create a snippet like
snippet, but with all its
unselected? hole data values unwrapped and all its
selected? values replaced by using
hvv-to-maybe-v to combine
shape’s data and
snippet’s data.
The hvv-to-maybe-v function is invoked with the shape of each hole to be combined, the data value from that hole in shape, and the data value from that hole in snippet.
The traversal may stop partway through with a result of (nothing) if it proves to be impossible to align all the holes in shape with all the selected? holes in snippet, or if at least one of the hvv-to-maybe-v invocations returns (nothing).
This operation serves as a way to compare the shape of a snippet with a known shape. For example, when this operation is used with content-free snippets (those which correspond to shapes via snippet-sys-shape->snippet and by snippet-sys-snippet->maybe-shape), and when those snippets have all their data values selected, it effectively serves as a way to compare two shapes for equality. It can also serve as a way to compute whether a given snippet is a compatible fit for a given hole (even if the snippet has some high-degree holes beyond those accounted for in the hole’s shape).
When the "comparison" is successful, that means the shape and snippet have sufficiently similar layouts to combine their data values. That allows this comparison to double as a sort of zipping operation.
Attempts to use the data carried in the given
hypersnippet shape to create a snippet like
snippet, but with all its
hole data values replaced by using
hvv-to-maybe-v to combine
shape’s data and
snippet’s data.
The hvv-to-maybe-v function is invoked with the shape of each hole to be combined, the data value from that hole in shape, and the data value from that hole in snippet.
The traversal may stop partway through with a result of (nothing) if it proves to be impossible to align all the holes in shape with all the holes in snippet, or if at least one of the hvv-to-maybe-v invocations returns (nothing).
This operation serves as a way to compare the shape of a snippet with a known shape. For example, when this operation is used with content-free snippets (those which correspond to shapes via snippet-sys-shape->snippet and by snippet-sys-snippet->maybe-shape), it effectively serves as a way to compare two shapes for equality.
When the "comparison" is successful, that means the shape and snippet have sufficiently similar layouts to combine their data values. That allows this comparison to double as a sort of zipping operation.
Iterates over the given
hypersnippet’s
hole data values in some order and calls the given function on each one, possibly stopping early if at least one invocation of the function returns
#t. If any of these invocations of the function returns
#t, the result is
#t. Otherwise, the result is
#f.
This essentially does for hypersnippets what Racket’s ormap does for lists.
Iterates over the given
hypersnippet’s
hole data values in some order and calls the given function on each one, possibly stopping early if at least one invocation of the function returns
#f. If any of these invocations of the function returns
#f, the result is
#f. Otherwise, the result is
#t.
This essentially does for hypersnippets what Racket’s andmap does for lists.
Iterates over the given
hypersnippet’s
hole data values in some order and calls the given procedure on each one. The procedure is called only for its side effects. The overall result of this call is
(void).
This essentially does for hypersnippets what Racket’s for-each does for lists.
Iterates over the given
hypersnippet’s
hole data values in some order and calls the given function on each one, possibly stopping early if at least one invocation of the function returns
(nothing). If any of these invocations of the function returns
(nothing), the result is
(nothing). Otherwise, the result is a
just? of a hypersnippet where the values have been replaced with the corresponding
hv-to-maybe-v function results.
Transforms the given
hypersnippet’s
hole data values by calling the given function on each one.
Concatenates the given "prefix"
hypersnippet prefix to any selected "suffix" hypersnippets computed from the
hole data by the given selection function
hv-to-suffix.
When hv-to-suffix is invoked for some hole of degree N, the result is expected to be a selectable? value. If it’s unselected?, a corresponding hole with the unselected-value appears verbatim in the concatenation result (without the value being concatenated to the prefix hypersnippet). If it’s selected?, its selected-value is expected to be a "suffix" hypersnippet, and it’s concatenated into the prefix hypersnippet along the hole it’s carried by in the prefix. For this concatenation to work, the suffix hypersnippet is expected to have the same degree as the prefix, and its holes of degree less than N are expected to contain trivial? values and to correspond to the holes of the prefix’s hole. Any holes of degree not less than N become holes in the concatenated result.
This operation is a specialization of snippet-sys-snippet-splice to the case where the concatenation is always successful. It obeys similar higher-dimensional algebraic laws.
Concatenates the given "prefix"
hypersnippet snippet to any selected "suffix" hypersnippets in its
hole data values.
Each hole data value is expected to be a selectable? value. If it’s unselected?, a corresponding hole with the unselected-value appears verbatim in the concatenation result (without the value being concatenated to the prefix hypersnippet). If it’s selected?, its selected-value is expected to be a "suffix" hypersnippet, and it’s concatenated into the prefix hypersnippet along the hole it’s carried by in the prefix. For this concatenation to work, the suffix hypersnippet is expected to have the same degree as the prefix, and its holes of degree less than N are expected to contain trivial? values and to correspond to the holes of the prefix’s hole. Any holes of degree not less than N become holes in the concatenated result.
This operation is a specialization of snippet-sys-snippet-splice to the case where the concatenation is always successful and the transformation function is always the identity. It obeys higher-dimensional algebraic laws similar to those snippet-sys-snippet-splice obeys.
Concatenates the given "prefix"
hypersnippet prefix to the "suffix" hypersnippets computed from the
hole data by the given selection function
hv-to-suffix.
Each suffix hypersnippet is concatenated into the prefix hypersnippet along the hole it’s carried by in the prefix. For this concatenation to work, the suffix hypersnippet is expected to have the same degree as the prefix, and its holes of degree less than N are expected to contain trivial? values and to correspond to the holes of the prefix’s hole. Any holes of degree not less than N become holes in the concatenated result.
This operation is a specialization of snippet-sys-snippet-bind-selective to the case where every hole is selected. That, in turn, is a specialization of snippet-sys-snippet-splice. Each of these operations obeys similar higher-dimensional algebraic laws.
Concatenates the given "prefix"
hypersnippet snippet to the "suffix" hypersnippets in its
hole data values.
Each suffix is concatenated into the prefix hypersnippet along the hole it’s carried by in the prefix. For this concatenation to work, the suffix hypersnippet is expected to have the same degree as the prefix, and its holes of degree less than N are expected to contain trivial? values and to correspond to the holes of the prefix’s hole. Any holes of degree not less than N become holes in the concatenated result.
This operation is a specialization of snippet-sys-snippet-join-selective to the case where every hole is selected. That, in turn, is a specialization of snippet-sys-snippet-splice. Each of these operations obeys similar higher-dimensional algebraic laws.
Given implementations for the following methods, returns something a struct can use to implement the
prop:snippet-sys interface.
The given method implementations should observe quite a few algebraic laws. At this point, we’re not entirely sure what the full extent of these laws should be yet. (TODO: Do at least a little better. This could be an ongoing effort, but ideally we would have something to show in the #:should-be-equal DSL that we use for other documentation of algebraic laws.) Even though this isn’t going to be comprehensive, here’s a rundown of quite a number of the assumptions we make about hypersnippet operations:
The shape->snippet and snippet->maybe-shape functions should be two-way partial inverses.
When any of these various methods is invoked upon only content-free hypersnippets (i.e. hypersnippets that can be converted to shapes by snippet->maybe-shape), its result should be consistent with the corresponding method of the shape-snippet-sys. Among other things, this means the dim-sys and the shape-snippet-sys provided here should be the same as those belonging to the shape-snippet-sys, and the shape-snippet-sys should recognize all its hypersnippets as being content-free.
The snippet-set-degree-maybe function should succeed when setting a snippet’s degree to the degree it already has.
The snippet-set-degree-maybe function should succeed when setting a snippet’s degree to a greater degree, as long as the original degree is nonzero.
If a call to snippet-set-degree-maybe succeeds, calling it again to set the hypersnippet’s degree back to its original value should also succeed.
The snippet-done and snippet-undone functions should be two-way partial inverses.
The snippet-done function should return content-free hypersnippets (i.e. hypersnippets that can be converted to shapes by snippet->maybe-shape).
If snippet-set-degree-maybe succeeds in setting the degree of a result of snippet-done, the updated hypersnippet should be equal to that which would have been created by snippet-done if the updated degree had been specified in the first place. Conversely, if snippet-done succeeds for two different degrees, then snippet-set-degree-maybe should be able to convert either result into the other.
The result of snippet-splice should be (nothing) if and only if the result of invoking the callback on at least one hole is (nothing).
If snippet-splice sees an unselected? hole, its result should be equal to the result it would have if that hole were selected? with a suffix obtained by calling snippet-done with the hole’s shape and unselected-value.
If snippet-splice gets a content-free prefix snippet and its concatenation succeeds, the result should be the same as concatenating the suffix snippets in a particular arrangement.
Using snippet-splice to concatenate a prefix snippet with a suffix that results from concatenating other snippets should give the same result as using it to concatenate the prefix snippet to the suffixes’ prefixes and then concatenating that combined prefix with the suffixes’ suffixes.
The result of snippet-zip-map-selective should be (nothing) if and only if either the holes of the shape don’t correspond to the selected holes of the snippet or the result of invoking the callback on at least one pair of corresponding holes is (nothing).
The snippet-sys-snippet-zip-map-selective of the shape-snippet-sys should work as a decision procedure for equality of hypersnippet shapes (as long as we select all the holes and supply a correct decision procedure for equality of the holes’ data values).
Given a particular (and not necessarily content-free) hypersnippet with particular selectable? values in its holes, if two hypersnippet shapes can successfully snippet-zip-map-selective with that hypersnippet, then those two shapes should also be able to zip with each other.
Given a particular (and not necessarily content-free) hypersnippet with particular selectable? values in its holes and a particular hypersnippet shape that can successfully snippet-zip-map-selective with it, another shape should only be able to zip with one of them if it can also zip with the other.
If we can snippet-zip-map-selective a hypersnippet shape with a hypersnippet, we should be able to zip the same shape with the result (as long as we select the same holes of the result).
3.2.2 Category-Theoretic Snippet System Manipulations🔗ℹ
Structure type property operations for structure-preserving transformations from one
snippet system’s
dimension numbers, hypersnippet
shapes, and
hypersnippets to another’s. In particular, these preserve relatedness of these values under the various operations a snippet system supplies.
Returns a
snippet-sys-morphism-sys? value like the given one, but with its source
snippet system replaced with the given one. This may raise an error if the given value isn’t similar enough to the one being replaced. This is intended only for use by
snippet-sys-morphism-sys/c and similar error-detection systems as a way to replace a value with one that reports better errors.
Returns a
snippet-sys-morphism-sys? value like the given one, but with its target
snippet system replaced with the given one. This may raise an error if the given value isn’t similar enough to the one being replaced. This is intended only for use by
snippet-sys-morphism-sys/c and similar error-detection systems as a way to replace a value with one that reports better errors.
When the replace methods don’t raise errors, they should observe the lens laws: The result of getting a value after it’s been replaced should be the same as just using the value that was passed to the replacer. The result of replacing a value with itself should be the same as not using the replacer at all. The result of replacing a value and replacing it a second time should be the same as just skipping to the second replacement.
Moreover, the replace methods should not raise an error when a value is replaced with itself. They’re intended only for use by snippet-sys-morphism-sys/c and similar error-detection systems, which will tend to replace a replace a value with one that reports better errors.
The other given method implementations should observe some algebraic laws. As with the laws described in make-snippet-sys-impl-from-various-1, we’re not quite sure what these laws should be yet (TODO), but here’s an inexhaustive description:
The dim-sys-morphism-sys and the shape-snippet-sys-morphism-sys provided here should be the same as those belonging to the shape-snippet-sys-morphism-sys.
The morph-snippet implementation should preserve the relatedness of hypersnippets under by the various operations of the snippet systems involved. For instance, if the source snippet system’s snippet-sys-snippet-splice implementation takes certain input snippets to a certain output snippet, then if we transform each of those using morph-snippet, the target snippet system’s snippet-sys-snippet-splice implementation should take values that are equal to the transformed input snippets to values that are equal to the transformed output snippets.
The result is a flat contract as long as the given contracts are flat.
Returns the composition of the two given
snippet-sys-morphism-sys? values. This is a transformation that goes from the first transformation’s source
snippet system to the second transformation’s target snippet system, transforming every
dimension number, hypersnippet
shape, and
hypersnippet by applying the first transformation and then the second. The target of the first transformation should match the source of the second.
This composition operation is written in diagrammatic order, where in the process of reading off the arguments from left to right, we proceed from the source to the target of each transformation. Composition is often written with its arguments the other way around (e.g. in Racket’s compose operation).
Every two snippet-sys-category-sys values are equal?. One such value is always an ok/c match for another.
This is equivalent to (functor-sys-apply-to-morphism fs (snippet-sys-morphism-sys-source ssms) (snippet-sys-morphism-sys-target ssms) ssms).
This is equivalent to (natural-transformation-sys-apply-to-morphism fs (snippet-sys-morphism-sys-source ssms) (snippet-sys-morphism-sys-target ssms) ssms).
These method implementations should observe the same algebraic laws as those required by make-functor-sys-impl-from-apply.
This is essentially a shorthand for calling make-functor-sys-impl-from-apply and supplying the appropriate source- and target-determining method implementations.
This could be called ‘natural-transformation-from-from-dim-sys-to-to-snippet-sys-sys?‘, but that would be even more verbose.
|
→ natural-transformation-sys-impl? |
|
|
|
|
|
These method implementations should observe the same algebraic laws as those required by make-natural-transformation-sys-impl-from-apply.
This is essentially a shorthand for calling make-natural-transformation-sys-impl-from-apply and supplying the appropriate endpoint-source- and endpoint-target-determining method implementations.
3.2.3 Snippet Format Systems in General🔗ℹ
This functor takes dimension systems to snippet systems that use them. It also takes dim-sys-morphism-sys? values to snippet-sys-morphism-sys? values, which facilitates the conversion of hypersnippets between two snippet systems that differ only in their choice of dimension system.
The given method implementations should observe some algebraic laws. Namely, the result of applying the functor to a dimension system should be a snippet system that uses it as its snippet-sys-dim-sys. Likewise, the result of applying the functor to a dim-sys-morphism-sys? should be a snippet-sys-morphism-sys? that uses it as its snippet-sys-morphism-sys-dim-sys-morphism-sys. In more symbolic terms (using a pseudocode DSL):
3.2.4 Category-Theoretic Snippet Format System Manipulations🔗ℹ
Structure type property operations for structure-preserving transformations from one
snippet format system to another. In practical terms, these are ways to transform one kind of
hypersnippet to another kind of hypersnippet without caring about what
dimension system is in use.
In terms of category theory, these are based on natural transformations which go beteween the respective snippet-format-sys-functor values, which means they’re transformations of dim-sys-morphism-sys? values to snippet-sys-morphism-sys? values which don’t necessarily take each identity morphism to an identity morphism. Unlike just any natural transformations, these also respect the fact that a snippet format system always produces a snippet system that uses the given dimension system. To respect this, this natural transformation takes a dim-sys-morphism-sys? value to a snippet-sys-morphism-sys? value which has it as its snippet-sys-morphism-sys-dim-sys-morphism-sys.
This natural transformation takes dim-sys-morphism-sys? values to snippet-sys-morphism-sys? values that use them as their snippet-sys-morphism-sys-dim-sys-morphism-sys values.
When the replace methods don’t raise errors, they should observe the lens laws: The result of getting a value after it’s been replaced should be the same as just using the value that was passed to the replacer. The result of replacing a value with itself should be the same as not using the replacer at all. The result of replacing a value and replacing it a second time should be the same as just skipping to the second replacement.
Moreover, the replace methods should not raise an error when a value is replaced with itself. They’re intended only for use by snippet-format-sys-morphism-sys/c and similar error-detection systems, which will tend to replace a replace a value with one that reports better errors.
The other given method implementation (snippet-format-sys-morphism-sys-functor-morphism) should observe some algebraic laws. Namely, when its resulting natural transformation is applied to a dim-sys-morphism-sys? value, it should result in a snippet-sys-morphism-sys? value that uses that value as its snippet-sys-morphism-sys-dim-sys-morphism-sys. In more symbolic terms (using a pseudocode DSL):
The result is a flat contract as long as the given contracts are flat.
This composition operation is written in diagrammatic order, where in the process of reading off the arguments from left to right, we proceed from the source to the target of each transformation. Composition is often written with its arguments the other way around (e.g. in Racket’s compose operation).
Every two snippet-format-sys-category-sys values are equal?. One such value is always an ok/c match for another.
|
→ functor-sys-impl? |
| apply-to-snippet-format-sys | | : | | |
|
| apply-to-snippet-format-sys-morphism-sys | | : | | |
|
These method implementations should observe the same algebraic laws as those required by make-functor-sys-impl-from-apply.
This is essentially a shorthand for calling make-functor-sys-impl-from-apply and supplying the appropriate source- and target-determining method implementations.