Skip to content

Instantly share code, notes, and snippets.

@hodzanassredin
hodzanassredin / Functor.cs
Created September 30, 2011 13:23
Trying to workaround missed higher-kinded type parameters in c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FunctorTest
{
public interface SingleParamPolymorph<T> { }
public interface TwoParamsPolymorph<T, U> { }
@hodzanassredin
hodzanassredin / monad.cs
Created September 30, 2011 13:56
moand in c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace Monad
{
public interface SingleParamPolymorph<T> { }
public interface TwoParamsPolymorph<T, U> { }
@hodzanassredin
hodzanassredin / monad2.cs
Created September 30, 2011 19:17
secont implementation of monad
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Monad;
namespace Monad
{
public interface Polymorph<T>
@hodzanassredin
hodzanassredin / monads.cs
Created October 3, 2011 00:28
different versions of list monad and yes linq is better
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Monad;
using System.Collections;
namespace Monad
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Monad;
using System.Collections;
namespace Monad
{
@hodzanassredin
hodzanassredin / Traits.cs
Created October 9, 2011 10:43
c# trait mixins via intefaces and extension methods
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Traits;
namespace TraitsMixin
{
//trait Similarity
public interface TraitSimilarity {
@hodzanassredin
hodzanassredin / enum.cs
Created October 19, 2011 17:26
enum in class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
namespace Experiment
{
public abstract class Enm
{
@hodzanassredin
hodzanassredin / typeClass.cs
Created October 19, 2011 19:20
type classes in c# light
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
namespace Experiment
{
public class Obj
@hodzanassredin
hodzanassredin / typeClass.cs
Created October 19, 2011 19:21
type class hard
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
namespace Experiment
{
class Program
{
@hodzanassredin
hodzanassredin / hell.cs
Created October 19, 2011 21:45
heelIn csharp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Monad;
using System.Collections;
namespace Monad
{