Fork me on GitHub
#specter
<
2018-06-29
>
Bravi18:06:53

why isn’t this library in core? 😄

Bravi18:06:00

this is so powerful!

Bravi18:06:43

something I would have written in JS like this:

userGroups
  .map(group => ({
    ...group,
    users: group.users
      .map( user =>  && user.profileViews && user.profileViews.count > 0
            ? ({...user,
                profileViews: {
                  ...user.profileViews,
                  count: user.profileViews.count + 1,
                }})
            : user
          )
  }));
managed to write using specter like this
(transform [ALL :users ALL #(:online %) :profile-views :count (partial < 0)] inc)

pepe14:07:20

And you only scratched the surface in your example. I am doing things with it, I strongly believe are almost impossible in other langs/libs. And I still consider myself Specter newbie 🙂

Bravi14:07:18

would you mind posting some examples please? I’m struggling to find some good examples / solutions to problems