Skip to content

Conversation

@kushti
Copy link
Member

@kushti kushti commented Jul 16, 2024

This PR is adding higher-order lambdas support in serialization, thus making them useful.

Example:

{
   val c = Coll(Coll(1))
   def fn(xs: Coll[Int]) = {
     val inc = { (x: Int) => x + 1 }
     def apply(in: (Int => Int, Int)) = in._1(in._2)
     val ys = xs.map { (x: Int) => apply((inc, x)) }
     ys.size == xs.size && ys != xs
   }
   c.exists(fn)
 }

Close #847

@kushti kushti changed the base branch from develop to v6.0.0 July 16, 2024 19:14
@kushti kushti added the 6.0 label Sep 2, 2024
@kushti kushti added this to the 6.0.0 milestone Sep 2, 2024
@kushti kushti self-assigned this Sep 2, 2024
@kushti kushti requested a review from aslesarenko September 2, 2024 16:24
Copy link
Member

@aslesarenko aslesarenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but also see the comment

SFunc(tDom, tRange, tpeParams)
// todo: serialize tParams
case _ =>
// todo: 6.0: replace 1008 check with identical but other opcode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please clarify "identical but other".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, // todo: 6.0: replace 1008 check with identical behavior but other opcode, to activate
// ReplacedRule(1008 -> new opcode) during 6.0 activation

@kushti kushti merged commit 1990030 into v6.0.0 Sep 3, 2024
@kushti kushti deleted the i847 branch September 3, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants