Skip to content

Add Expr.ofMap family of methods #9278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

anatoliykmetyuk
Copy link
Contributor

No description provided.

@anatoliykmetyuk
Copy link
Contributor Author

anatoliykmetyuk commented Jul 3, 2020

On top #9279

val listOfExprs: List[Expr[(K, V)]] =
m.iterator.map((k, v) => '{ ($k, $v) }).toList
val exprOfList: Expr[List[(K, V)]] = Expr.ofList(listOfExprs)
'{ Map.from($exprOfList) }
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use Map.apply and pass the varargs directly as done in ofList.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants