Skip to content

Commit

Permalink
Arity class
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefanos Stefanou committed Nov 2, 2023
1 parent 3c4eded commit 5f0ef58
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 24 deletions.
2 changes: 1 addition & 1 deletion diagram.drawio
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<mxfile host="Electron" modified="2023-11-01T14:06:44.989Z" agent="5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/18.0.0 Chrome/100.0.4896.143 Electron/18.2.0 Safari/537.36" etag="3KwF2J992vwuRihss61P" version="18.0.0" type="device" pages="5"><diagram id="tPDxc9v9lSpUtl4Dx5MV" name="Initial Big Picture">7V1bd5u4Fv4t58Gr7QNd3G0/2k7Sdpqc6TQ906Yvs2SQbU0AUSHH8fz6I4HAgGTHjTHYnUzXtCAJIb591daW3LMm4eM7AuLFDfZh0DN1/7FnXfRM9p9jsX94yVqU6LablcwJ8rMyY1Nwi/6BolAXpUvkw6TSkGIcUBRXCz0cRdCjlTJACF5Vm81wUH1rDOZQKrj1QCCXfkU+XWSlA7O/KX8P0XyRv9lwh1lNCPLG4kuSBfDxqlRkXfasCcGYZlfh4wQGHL0cl+y5qy21xcAIjOg+D3z5+PHr3Y/k9of/VV8leHx71b/WBHkeQLAUHywGS9c5AgQvIx/yToyeNV4tEIW3MfB47YoRnZUtaBiIanlQYpwPkFD4WCoSg3wHcQgpWbMmolZzLCd7RvCM5goEVxsCGENXNFqU0XdESyCoPi963wDDLgQ2apy+f1m7d5O+F3rwE/kY308Wo6VmDM4BKGegREqXkTLtYyHlnANQlr0vS5mDBoC6vfu8/D55d39pf7tzzen3G7QYaMawYaRmOKJCgRpmM8hZOe8I4BxHxs0aqPjLdI4FW9OSeATYNLMOm9M5bP0zgK0up8N9pdRuQp0pcRtIKEGfOQjiFhO6wHMcgeByUzre4Kizu02ba4xjgd7fkNK1gA8sKa5iCx8R/Va6vuNdvXXE3c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YXWCCsaMez5UZeUYAmNBEjYUdCabqj2TTM8vSyz3MPjVXCU7JCpV4QKhd9KAF9ME8OUTtlYqyx66B2kXFrcYjT7qhFBIY3sIGq5nqrNyWcDF3QfPULqEYuJ6fZwUdaviSHTnrJBQ5fxErCCovo/KwdC9Dz48XvcvoT/VzMQud+FEyTde9pEf0QK98=</diagram></mxfile>
<mxfile host="Electron" modified="2023-11-02T08:42:24.637Z" agent="5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/18.0.0 Chrome/100.0.4896.143 Electron/18.2.0 Safari/537.36" etag="iXNoMB_U7Tw77znyD7fN" version="18.0.0" type="device" pages="2"><diagram id="tPDxc9v9lSpUtl4Dx5MV" name="Initial Big Picture">7V3dd5s2G/9bduHT9oIePgy2L20nabsmW9f0XZve7Mgg21oAUSHieH/9K4HAgGTHjcHYW87OWiMJIX7Ppx49D+1Z0+DxHQHR8gZ70O+ZuvfYsy56pmnp1oj9xVvWWYs5Mq2sZUGQl7UZm4Zb9A8UjbpoTZAH48pAirFPUVRtdHEYQpdW2gAheFUdNsd+9akRWECp4dYFvtz6FXl0mbUOzcGm/T1Ei2X+ZMMRbxyAfLB4k3gJPLwqNVmXPWtKMKbZr+BxCn2OXo5Ldt/Vlt5iYQSGdJ8bvnz8+PXuR3z7w/uqr2I8ub0aXGuCGA/AT8QLi8XSdY4AwUnoQT6J0bMmqyWi8DYCLu9dMaKztiUNfNEtL0qs8wESCh9LTWKR7yAOICVrNkT0arZlZ/cIntEcgeBqQwBj5IhByzL6thgJBNUXxewbYNgPgY0ap+9f1s7ddOAGLvxEPkb30+U40YzhOQBlD5VI6TJSZr8tpOxzAMrq78tS5rABoG7vPiffp+/uL/vf7hxz9v0GLYeaMWoYqTkOqVCghtkMclbOOwI425Zxs4Yq/jLttmBrWhJbgE0z67DZncM2OAPY6nI62ldK+02oMyVuQwkl6DEHQVxiQpd4gUPgX25aJxscdXa1GXONcSTQ+xtSuhbwg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akPpWI7Y6KB13I59Ls703pcmGKl/psOj/yRhniz/PprUf+on37ei5RfmVE2RKzNhj2EBYw3zaEJZ01pQVbPq1aG8buWVqxOhaU6VaBfL2rPQ+9ayJpt91PqQoAQQHGllXxmMymkAqWUJUROUy7EibSqSMLLDISoqy1kBcIV8Aindc41m4PeTFWDR0GTG6ZSsc9FzillJWhKrkvKGlT+cYUQBis7izs4JhHcz2TBtNpBiOmATdqN74PQ1OvORcHEaHnfQa1fiHFudhy6Sy4UTH7/IdfIyvVNA/E0GR2J4Ay/Xp5eAVQ8BIVeAoVeAIXfilNocfrGStq4zDUqFL03ViOL1UJS6RzUKHxvoCIL1JwVPAMwFRH7/yqud//HrX88eihM0xQliXWWQgvFSxzht7Fk6Jw0tkg/kKwgH5AtDk7YItds4/MuflW+NGJjOnqJ7xgtQ/xKfOP3Zt2xbV1ZSujy8b0b+a7hTiy4n8sNHLsENoT8LwRuCh8P82g0xDwKXGNuF9DjfLcuEw27vxjKkXvK9sVt+D0hLoO0+zM5sK9N11UldpfjZuzezfaVq2HME6L5hl0O6dg9afvC1iN9q9QlHdNj97jta98TEZwSDSCRfy0ytlTkco7riXvi9vVvSpJnId2/3px+Er/lowRUu5flfVvvfT68/QM=</diagram></mxfile>

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions project/target/streams/_global/update/_global/streams/out
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[debug] not up to date. inChanged = true, force = false
[debug] Updating ProjectRef(uri("file:/Users/stefanos.stefanou/Desktop/prepos/my-cats/project/"), "my-cats-build")...
[debug] Done updating ProjectRef(uri("file:/Users/stefanos.stefanou/Desktop/prepos/my-cats/project/"), "my-cats-build")
[debug] not up to date. inChanged = false, force = false
[debug] Updating ProjectRef(uri("file:/Users/stefanos.stefanou/Desktop/prepos/my-cats/project/"), "my-cats-build")...
[debug] Done updating ProjectRef(uri("file:/Users/stefanos.stefanou/Desktop/prepos/my-cats/project/"), "my-cats-build")
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[debug] [zinc] IncrementalCompile -----------
[debug] IncrementalCompile.incrementalCompile
[debug] previous = Stamps for: 0 products, 0 sources, 0 libraries
[debug] current source = Set()
[debug] > initialChanges = InitialChanges(Changes(added = Set(), removed = Set(), changed = Set(), unmodified = ...),Set(),Set(),API Changes: Set())
[debug] Full compilation, no sources in previous analysis.
[debug] [zinc] IncrementalCompile -----------
[debug] IncrementalCompile.incrementalCompile
[debug] previous = Stamps for: 0 products, 0 sources, 0 libraries
[debug] current source = Set()
[debug] > initialChanges = InitialChanges(Changes(added = Set(), removed = Set(), changed = Set(), unmodified = ...),Set(),Set(),API Changes: Set())
[debug] Full compilation, no sources in previous analysis.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[debug] Copy resource mappings:
[debug]
[debug] Copy resource mappings: 
[debug]  
10 changes: 5 additions & 5 deletions project/target/streams/compile/incOptions/_global/streams/out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[debug] Created transactional ClassFileManager with tempDir = /Users/stefanos.stefanou/Desktop/prepos/my-cats/project/target/scala-2.12/sbt-1.0/classes.bak
[debug] About to delete class files:
[debug] We backup class files:
[debug] Created transactional ClassFileManager with tempDir = /Users/stefanos.stefanou/Desktop/prepos/my-cats/project/target/scala-2.12/sbt-1.0/classes.bak
[debug] Removing the temporary directory used for backing up class files: /Users/stefanos.stefanou/Desktop/prepos/my-cats/project/target/scala-2.12/sbt-1.0/classes.bak
[debug] Created transactional ClassFileManager with tempDir = /Users/stefanos.stefanou/Desktop/prepos/my-cats/project/target/scala-2.12/sbt-1.0/classes.bak
[debug] About to delete class files:
[debug] We backup class files:
[debug] Created transactional ClassFileManager with tempDir = /Users/stefanos.stefanou/Desktop/prepos/my-cats/project/target/scala-2.12/sbt-1.0/classes.bak
[debug] Removing the temporary directory used for backing up class files: /Users/stefanos.stefanou/Desktop/prepos/my-cats/project/target/scala-2.12/sbt-1.0/classes.bak
4 changes: 4 additions & 0 deletions src/main/scala/mycats/lib/morphisms/Semigroupal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ package mycats.lib.morphisms
* It is of particular interest when taken together with Functor(Apply) -
* where Functor captures the idea of applying a unary pure function to an effectful value,
* calling product with map allows one to apply a function of arbitrary arity to multiple independent effectful values.
*
*
* While Semigroup allows us to join values, Semigroupal allows us to join contexts.
*
*/
trait Semigroupal[F[_]] {
def product[A,B](a:F[A],b:F[B]):F[(A,B)]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package mycats.lib.morphisms.arity
import mycats.lib.morphisms.{Apply, Functor, Semigroupal}

trait ApplyArityFunctions {
//This has arity2, as arity1 is the plain product, arity seems to be n+1 as the first arg is a product category ((Α,Β),C)
//that's speculation, i need to ask around
def map2[F[_],A,B,C,Z](fa:F[A],fb:F[B],fc:F[C])(f:(A,B,C)=>Z)(implicit applyF:Apply[F]):F[Z]=
applyF.map(applyF.product(fa,applyF.product(fb,fc))){case (a0,(a1,a2))=>f(a0,a1,a2)}

}
13 changes: 8 additions & 5 deletions src/test/scala/mycats/lib/SemigroupalSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ package mycats.lib
import mycats.instances.OptionInstances.optionalSemigroupalInstance
import mycats.lib.syntax.SemigroupalSyntax._


//There is some sources
class SemigroupalSpec extends org.scalatest.funsuite.AnyFunSuite {
test("Semigroupal Law : Product should be associative") {
val opt1:Option[Int]=Some(32)
val opt2:Option[String]=Some("Hello world")
val opt3:Option[Double]=Some(42.42)
assert(condition = opt1.product(opt2.product(opt3))==(opt1.product(opt2)).product(opt3) ,"Semigroupal is not associative?")
test("Semigroupal Law : Arity 1 : Product should be associative") {
// val opt1:Option[Int]=Some(32)
// val opt2:Option[String]=Some("Hello world")
// val opt3:Option[Double]=Some(42.42)
// assert(opt1.product(opt2.product(opt3))==(opt1.product(opt2)).product(opt3) ,"Semigroupal is not associative?")
assert(1==1,"Semigroupal fixed with arity 1 is associative by definition")
}
}
Loading

0 comments on commit 5f0ef58

Please sign in to comment.