The following sample wants to make sure the person’s age is between 18 and 65, weight is no more than 200 and tall enough (>120).
82 people like thisPosted: 13 years ago by Tao Liu
Observer pattern in F#
34 people like thisPosted: 13 years ago by Tao Liu
the interest rate is decided by the internal state: account balance
34 people like thisPosted: 13 years ago by Tao Liu
Command pattern for redo-undo scenario.
47 people like thisPosted: 13 years ago by Tao Liu
singleton pattern in F#
39 people like thisPosted: 13 years ago by Tao Liu
Proxy pattern is a class functioning as an interface to something else.
37 people like thisPosted: 13 years ago by Tao Liu
This command redo-undo implement group the command under Do/Undo category.
70 people like thisPosted: 13 years ago by Tao Liu
Implementing the strategy pattern by putting all the strategies as a static member function for a class that can't be instantiated like the singleton
2 people like thisPosted: 11 years ago by Evanescent Devil
Factory Pattern
1 people like thisPosted: 11 years ago by Evanescent Devil
implement the decorate pattern in F#. The decorate pattern is to add new featuures to an object at runtime.
36 people like thisPosted: 13 years ago by Tao Liu
Strategy pattern in F#
83 people like thisPosted: 13 years ago by Tao Liu
Invoke the methods from incompatible types
110 people like thisPosted: 13 years ago by Tao Liu
use composite pattern to construct a tree and visitor pattern to bring back the traverse result.
34 people like thisPosted: 13 years ago by Tao Liu
Factory pattern in F#
81 people like thisPosted: 13 years ago by Tao Liu
Unlike the previous chain of responsibility, this version use the pipeline to chain responsibilities.
104 people like thisPosted: 13 years ago by Tao Liu
Template pattern is a behavior-based pattern. Realized the importance of high order function, this is a way to use high order function. Still keep the type structure to organize my code.
38 people like thisPosted: 13 years ago by Tao Liu
Decorator Pattern
2 people like thisPosted: 11 years ago by Evanescent Devil
Observer Pattern
2 people like thisPosted: 11 years ago by Evanescent Devil