Skip to content

Instantly share code, notes, and snippets.

@cdiggins
Created December 14, 2022 16:30
Show Gist options
  • Save cdiggins/ef7dfa0559ee98ee41fdcb463fecf7f7 to your computer and use it in GitHub Desktop.
Save cdiggins/ef7dfa0559ee98ee41fdcb463fecf7f7 to your computer and use it in GitHub Desktop.
Example of concepts in action
class ConceptExamples
{
Number Lerp(Number a, Number b, double t)
=> a * t + b * (1.0 - t);
Number Dot(Vector v)
=> (v * v).Sum().Sqrt();
Number Sum(Array xs)
=> xs.Aggregate((x, y) => x + y);
}
@cdiggins
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment