The code gets cleaner this way:
if (!myBox.exist(!_.hasSomething))
if (myBox.forall(_.hasSomething))
On 2013-12-17 21:55, Antonio Salazar Cardozo wrote:
If you know it's a Box, why not use exists? They're functionally identical in the case of Boxes…
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
> <mailto:liftweb%2B...@googlegroups.com>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
> --- You received this message because you are subscribed to the
> Google Groups "Lift" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to liftweb+u...@googlegroups.com
> <mailto:liftweb%2B...@googlegroups.com>.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
it, send an email to liftweb+unsubscribe@googlegroups.com<mailto:liftweb%2Bunsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
-- -- Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you:
https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are subscribed to the
Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to liftweb+unsubscribe@googlegroups.com<mailto:liftweb%2Bunsubscribe@googlegroups.com>.
di...@fmpwizard.com <mailto:di...@fmpwizard.com>
For more options, visit https://groups.google.com/groups/opt_out.
--
Diego Medina
Lift/Scala consultant
http://fmpwizard.telegr.am
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
it, send an email to liftweb+unsubscribe@googlegroups.com<mailto:liftweb%2Bunsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
-- -- Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you:
https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are subscribed to the
Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to liftweb+unsubscribe@googlegroups.com<mailto:liftweb%2Bunsubscribe@googlegroups.com>.
di...@fmpwizard.com <mailto:di...@fmpwizard.com>
For more options, visit https://groups.google.com/groups/opt_out.
--
Diego Medina
Lift/Scala consultant
http://fmpwizard.telegr.am
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
I'd say it's okay and should be exactly so.
I take it as it is in math. "All crocodiles on moon are red" is true. "All crocodiles on moon are blue" is also true. Or, generally speaking, an empty set of elements satisfies all predicates.
The more intriguing thing is Failure().forall. One should understand that using "forall" on an empty collection returns "true" on purpose. But if that's TOO surprising -- it's OK for me to take back the PR.
On 2013-12-23 23:40, Diego Medina wrote:
great, now, how do you normally handle this case:
"return true if the Box is empty, or if Box's value satisfies the predicate"
I know this is how forall in scala also works, but if I pass a predicate and the box is empty and I get true, isn't that kind of unexpected?
Thanks
On Mon, Dec 23, 2013 at 2:34 PM, Vasya Novikov <n1m5-goo...@yandex.ru <mailto:n1m5-googlegroups@yandex.ru>> wrote:
All tests successfully pass, with 2.10.0, 2.9.1, 2.9.1-1, 2.9.2.
I made a pull request: https://github.com/lift/framework/pull/1502
On 2013-12-23 18:57, Diego Medina wrote:
how did you increase the memory on sbt? 8GB should be plenty
to run the test (unless you are doing ++test.
What we normally do is only run test from sbt, and then you
may want restart sbt and then use
++2.10.0
to switch to another scala version and then run test again, to
make sure it works there too (and again for all the versions
we build lift, which you can find on the build.sbt file.
Thanks
Diego
On Mon, Dec 23, 2013 at 3:56 AM, Vasya Novikov
<n1m5-goo...@yandex.ru
<mailto:n1m5-googlegroups@yandex.ru><mailto:n1m5-googlegroups@yandex.ru
For more options, visit
https://groups.google.com/groups/opt_out.
-- -- Lift, the simply functional web framework:
http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you:
https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are subscribed
to the
Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails
from it,
send an email to liftweb+unsubscribe@googlegroups.com<mailto:liftweb%2Bunsubscribe@googlegroups.com
<mailto:liftweb%2Bunsubscribe@googlegroups.com>
<mailto:liftweb%252Bunsubscribe@googlegroups.com>>.
<mailto:di...@fmpwizard.com <mailto:di...@fmpwizard.com>>
For more options, visit
https://groups.google.com/groups/opt_out.
-- Diego Medina
Lift/Scala consultant
di...@fmpwizard.com <mailto:di...@fmpwizard.com>
http://fmpwizard.telegr.am
-- -- Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you:
https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the
Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to liftweb+unsubscribe@googlegroups.com
<mailto:liftweb%2Bunsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
-- -- Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you:
https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are subscribed to the
Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to liftweb+unsubscribe@googlegroups.com
<mailto:liftweb%2Bunsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
--
Diego Medina
Lift/Scala consultant
di...@fmpwizard.com <mailto:di...@fmpwizard.com>
http://fmpwizard.telegr.am
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
<mailto:n1m5-googlegroups@yandex.ru><mailto:n1m5-googlegroups@yandex.ru
<mailto:n1m5-googlegroups@yandex.ru>>> wrote:
All tests successfully pass, with 2.10.0, 2.9.1, 2.9.1-1,
2.9.2.
I made a pull request:
https://github.com/lift/framework/pull/1502
On 2013-12-23 18:57, Diego Medina wrote:
how did you increase the memory on sbt? 8GB should be
plenty
to run the test (unless you are doing ++test.
What we normally do is only run test from sbt, and
then you
may want restart sbt and then use
++2.10.0
to switch to another scala version and then run test
again, to
make sure it works there too (and again for all the
versions
we build lift, which you can find on the build.sbt file.
Thanks
Diego
On Mon, Dec 23, 2013 at 3:56 AM, Vasya Novikov
<n1m5-goo...@yandex.ru
<mailto:n1m5-googlegroups@yandex.ru>
<mailto:n1m5-googlegroups@yandex.ru
<mailto:n1m5-googlegroups@yandex.ru>>
<mailto:n1m5-googlegroups@yandex.ru
<mailto:n1m5-googlegroups@yandex.ru>
<mailto:n1m5-googlegroups@yandex.ru
<mailto:liftweb%2Bunsubscribe@googlegroups.com
<mailto:liftweb%252Bunsubscribe@googlegroups.com>
<mailto:liftweb%252Bunsubscribe@googlegroups.com
<mailto:liftweb%25252Bunsubscribe@googlegroups.com>>>.
For more options, visit
https://groups.google.com/groups/opt_out.
-- -- Lift, the simply functional web
framework:
http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you:
https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are
subscribed
to the
Google Groups "Lift" group.
To unsubscribe from this group and stop receiving
emails
from it,
send an email to
<mailto:liftweb%2Bunsubscribe@googlegroups.com
<mailto:liftweb%252Bunsubscribe@googlegroups.com>
<mailto:liftweb%252Bunsubscribe@googlegroups.com
<mailto:liftweb%25252Bunsubscribe@googlegroups.com>>>.
For more options, visit
https://groups.google.com/groups/opt_out.
-- Diego Medina
Lift/Scala consultant
di...@fmpwizard.com <mailto:di...@fmpwizard.com>
<mailto:di...@fmpwizard.com <mailto:di...@fmpwizard.com>>
<mailto:di...@fmpwizard.com
<mailto:di...@fmpwizard.com> <mailto:di...@fmpwizard.com
<mailto:di...@fmpwizard.com>>>
http://fmpwizard.telegr.am
-- -- Lift, the simply functional web
framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you:
https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed
to the
Google Groups "Lift" group.
To unsubscribe from this group and stop receiving
emails from
it, send an email to
<mailto:liftweb%252Bunsubscribe@googlegroups.com>>.
For more options, visit
https://groups.google.com/groups/opt_out.
-- -- Lift, the simply functional web framework:
http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you:
https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are subscribed
to the
Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails
from it,
send an email to liftweb+unsubscribe@googlegroups.com
<mailto:liftweb%2Bunsubscribe@googlegroups.com>
<mailto:liftweb%2Bunsubscribe@googlegroups.com
<mailto:liftweb%252Bunsubscribe@googlegroups.com>>.
For more options, visit
https://groups.google.com/groups/opt_out.
-- Diego Medina
Lift/Scala consultant
di...@fmpwizard.com <mailto:di...@fmpwizard.com>
<mailto:di...@fmpwizard.com <mailto:di...@fmpwizard.com>>
http://fmpwizard.telegr.am
-- -- Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you:
https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the
Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to liftweb+unsubscribe@googlegroups.com
<mailto:liftweb%2Bunsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
-- -- Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you:
https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are subscribed to the
Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to liftweb+unsubscribe@googlegroups.com
<mailto:liftweb%2Bunsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
--
Diego Medina
Lift/Scala consultant
di...@fmpwizard.com <mailto:di...@fmpwizard.com>
http://fmpwizard.telegr.am
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--- You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
> <mailto:liftweb%2B...@googlegroups.com>
> <mailto:liftweb%2B...@googlegroups.com
> <mailto:liftweb%252Bunsubscribe@googlegroups.com>>
> <mailto:liftweb%2B...@googlegroups.com
> <mailto:liftweb%252Bunsubscribe@googlegroups.com>
> <mailto:liftweb%252Bunsubscribe@googlegroups.com
> <mailto:liftweb%25252Bunsubscribe@googlegroups.com>>>
>
> <mailto:liftweb%2B...@googlegroups.com
> <mailto:liftweb%252Bunsubscribe@googlegroups.com>
> <mailto:liftweb%252Bunsubscribe@googlegroups.com
> <mailto:liftweb%25252Bunsubscribe@googlegroups.com>>
>
> <mailto:liftweb%252Bunsubscribe@googlegroups.com
> <mailto:liftweb%25252Bunsubscribe@googlegroups.com>
> <mailto:liftweb%25252Bunsubscribe@googlegroups.com
> <mailto:liftweb%2525252Bunsubscribe@googlegroups.com>>>>.
>
>
>
> For more options, visit
> https://groups.google.com/groups/opt_out.
>
>
> -- -- Lift, the simply functional web
> framework:
> http://liftweb.net
> Code: http://github.com/lift
> Discussion:
> http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
> --- You received this message because you are
> subscribed
> to the
> Google Groups "Lift" group.
> To unsubscribe from this group and stop
> receiving
> emails
> from it,
> send an email to
> liftweb+u...@googlegroups.com
> <mailto:liftweb%2B...@googlegroups.com>
> <mailto:liftweb%2B...@googlegroups.com
> <mailto:liftweb%252Bunsubscribe@googlegroups.com>>
> <mailto:liftweb%2B...@googlegroups.com
> <mailto:liftweb%252Bunsubscribe@googlegroups.com>
> <mailto:liftweb%252Bunsubscribe@googlegroups.com
> <mailto:liftweb%25252Bunsubscribe@googlegroups.com>>>
>
> <mailto:liftweb%2B...@googlegroups.com
> <mailto:liftweb%252Bunsubscribe@googlegroups.com>
> <mailto:liftweb%252Bunsubscribe@googlegroups.com
> <mailto:liftweb%25252Bunsubscribe@googlegroups.com>>
>
> <mailto:liftweb%252Bunsubscribe@googlegroups.com
> <mailto:liftweb%25252Bunsubscribe@googlegroups.com>
> <mailto:liftweb%25252Bunsubscribe@googlegroups.com
> <mailto:liftweb%2525252Bunsubscribe@googlegroups.com>>>>.
> <mailto:liftweb%2B...@googlegroups.com>
> <mailto:liftweb%2B...@googlegroups.com
> <mailto:liftweb%252Bunsubscribe@googlegroups.com>>
> <mailto:liftweb%2B...@googlegroups.com
> <mailto:liftweb%252Bunsubscribe@googlegroups.com>
> <mailto:liftweb%252Bunsubscribe@googlegroups.com
> <mailto:liftweb%25252Bunsubscribe@googlegroups.com>>>.
> For more options, visit
> https://groups.google.com/groups/opt_out.
>
>
> -- -- Lift, the simply functional web
> framework:
> http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
> --- You received this message because you are
> subscribed
> to the
> Google Groups "Lift" group.
> To unsubscribe from this group and stop receiving
> emails
> from it,
> send an email to
> liftweb+u...@googlegroups.com
> <mailto:liftweb%2B...@googlegroups.com>
> <mailto:liftweb%2B...@googlegroups.com
> <mailto:liftweb%252Bunsubscribe@googlegroups.com>>
> <mailto:liftweb%2B...@googlegroups.com
> <mailto:liftweb%252Bunsubscribe@googlegroups.com>
> <mailto:liftweb%252Bunsubscribe@googlegroups.com
> <mailto:liftweb%25252Bunsubscribe@googlegroups.com>>>.
> For more options, visit
> https://groups.google.com/groups/opt_out.
>
>
>
>
> -- Diego Medina
> Lift/Scala consultant
> di...@fmpwizard.com <mailto:di...@fmpwizard.com>
> <mailto:di...@fmpwizard.com <mailto:di...@fmpwizard.com>>
> <mailto:di...@fmpwizard.com
> <mailto:di...@fmpwizard.com> <mailto:di...@fmpwizard.com
> <mailto:di...@fmpwizard.com>>>
> http://fmpwizard.telegr.am
> -- -- Lift, the simply functional web
> framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
> ---
> You received this message because you are subscribed
> to the
> Google Groups "Lift" group.
> To unsubscribe from this group and stop receiving
> emails from
> it, send an email to
> liftweb+u...@googlegroups.com
> <mailto:liftweb%2B...@googlegroups.com>
> <mailto:liftweb%2B...@googlegroups.com
> <mailto:liftweb%252Bunsubscribe@googlegroups.com>>.
> For more options, visit
> https://groups.google.com/groups/opt_out.
>
>
> -- -- Lift, the simply functional web framework:
> http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
> --- You received this message because you are subscribed
> to the
> Google Groups "Lift" group.
> To unsubscribe from this group and stop receiving emails
> from it,
> send an email to liftweb+u...@googlegroups.com
> <mailto:liftweb%2B...@googlegroups.com>
> <mailto:liftweb%2B...@googlegroups.com
> <mailto:liftweb%252Bunsubscribe@googlegroups.com>>.
> For more options, visit
> https://groups.google.com/groups/opt_out.
>
>
>
>
> --
> Diego Medina
> Lift/Scala consultant
> di...@fmpwizard.com <mailto:di...@fmpwizard.com>
> <mailto:di...@fmpwizard.com <mailto:di...@fmpwizard.com>>
> http://fmpwizard.telegr.am
> --
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
> ---
> You received this message because you are subscribed to the
> Google Groups "Lift" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to liftweb+u...@googlegroups.com
> <mailto:liftweb%2B...@googlegroups.com>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
> --- You received this message because you are subscribed to the
> Google Groups "Lift" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to liftweb+u...@googlegroups.com
> <mailto:liftweb%2B...@googlegroups.com>.