View tga.hs
{-|
Haskell port of OCaml http://pastebin.com/a66MDZkP
-}
import qualified Data.ByteString.Lazy as B
import Data.Word8
type Point = (Double, Double)
type Rgb = (Double, Double, Double)
tga :: (Point -> Rgb) -> Int -> Int -> String -> IO ()
View RandomArt.hs
{-|
Haskell port of F# http://fssnip.net/si
-}
import Control.Applicative ((<$>), (<*>))
import System.Random (randomIO, randomRIO)
import qualified Data.ByteString.Lazy as B
import Data.Word8
data Expr =
VariableX
View FuncHelper.cs
#region Partial application and Currying
static class FuncHelper
{
public static Func<T2, T3, T4, TResult> ApplyPartial<T1, T2, T3, T4, TResult>
(Func<T1, T2, T3, T4, TResult> function, T1 arg1)
{
return (b, c, d) => function(arg1, b, c, d);
}
public static Func<T2, T3, TResult> ApplyPartial<T1, T2, T3, TResult>
View AssemblyInfo.fs
(*
* Minimal AssemblyInfo.fs for automatic help screen generation in Command Line Parser Library 2.0.x-pre.
*)
module YourProject.AssemblyInfo
open System.Reflection
[<assembly: AssemblyCopyright("Copyright (c) 2015 Your Name Here")>]
do()
View uninstall-mono.sh
#!/bin/sh -x
#This script removes Mono from an OS X System. It must be run as root
rm -r /Library/Frameworks/Mono.framework
rm -r /Library/Receipts/MonoFramework-*
for dir in /usr/bin /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man5; do
(cd ${dir};
View process_darwin-2.go
// Copyright 2015 Giacomo Stelluti Scala. All rights reserved. See doc/License.md in the project root for license information.
package process
/*
#include <stdlib.h>
#include "libproc.h"
*/
import "C"
import "unsafe"
View process_darwin.go
// Copyright 2015 Giacomo Stelluti Scala. All rights reserved. See doc/License.md in the project root for license information.
package process
/*
#include <stdlib.h>
#include "libproc.h"
*/
import "C"
import "unsafe"
View Option-Monad.cs
internal enum MaybeType { Just, Nothing }
/// <summary>
/// C# implementation of F# 'T option. Based on the one found in http://goo.gl/jMwzg.
/// Here Haskell naming is used, to not create confusion with local option concept.
/// </summary>
internal abstract class Maybe<T>
{
private readonly MaybeType tag;
View DynamicComparer.cs
static class DynamicComparer
{
public static bool DynamicEquals<T>(this T value, T other)
{
if (object.Equals(value, default(T)))
{
throw new ArgumentNullException("value");
}
if (object.Equals(other, default(T)))
View Pairwise.cs
public static IEnumerable<TResult> Pairwise<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TSource, TResult> selector)
{
if (source == null)
{
throw new ArgumentNullException("source");
}
if (selector == null)
{
throw new ArgumentNullException("selector");