Skip to content
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

apply: return all effects #310

Merged
merged 2 commits into from
May 20, 2024
Merged

apply: return all effects #310

merged 2 commits into from
May 20, 2024

Conversation

itayd
Copy link
Contributor

@itayd itayd commented May 18, 2024

this returns all effects made (subject id, type and a free message). this can be used by UI to understand which objects where touched and act on it.

one usage is for the UI to check for newly created connections and suggest to initialize them, as it is done in this PR in the cli.

"go.autokitteh.dev/autokitteh/sdk/sdktypes"
)

type EffectType string
Copy link
Contributor

Choose a reason for hiding this comment

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

I would have called it "action" or "result", but it's entirely not important

@@ -16,6 +16,23 @@ func Transform[A, B any](as []A, f func(A) B) []B {
return bs
}

func TransformFilter[A, B any](as []A, f func(A) *B) []B {
Copy link
Contributor

Choose a reason for hiding this comment

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

@itayd itayd merged commit cab6e29 into main May 20, 2024
10 checks passed
@itayd itayd deleted the itay/effects branch May 20, 2024 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants