Constructor functions - how to implement? #1025
Answered
by
louthy
TangkasOka
asked this question in
Q&A
-
Hi, This is probably an RTFM question, but I'm not sure where to look for the FM. :-) I'm interested in implementing constructor functions for creating objects without using "new". That is, using the same semantics in new classes that I write as is done in LanguageExt. Like what is done in LanguageExt for "Seq()". Are there any tips on how this is done? Either documentation or code. Thanks, Charlie |
Beta Was this translation helpful? Give feedback.
Answered by
louthy
Apr 25, 2022
Replies: 1 comment 1 reply
-
Just create static methods in static classes, then do:
That will make them act like top level functions |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
TangkasOka
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just create static methods in static classes, then do:
That will make them act like top level functions