This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main = do | |
x <- getLine | |
putStrLn $ reverse x | |
main' = (liftM reverse >=> putStrLn) $ getLine | |
main'' = getLine >>= (putStrLn . reverse) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main = do | |
x <- getLine | |
putStrLn $ reverse x | |
main' = (liftM reverse >=> putStrLn) $ getLine | |
main'' = getLine >>= (putStrLn . reverse) | |
main''' = (reverse `liftM` getLine) >>= putStrLn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
X/* | |
X * line3d was dervied from DigitalLine.c published as "Digital Line Drawing" | |
X * by Paul Heckbert from "Graphics Gems", Academic Press, 1990 | |
X * | |
X * 3D modifications by Bob Pendleton. The original source code was in the public | |
X * domain, the author of the 3D version places his modifications in the | |
X * public domain as well. | |
X * | |
X * line3d uses Bresenham's algorithm to generate the 3 dimensional points on a | |
X * line from (x1, y1, z1) to (x2, y2, z2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <iostream> | |
#include <cstdio> | |
#include <GL/glut.h> | |
using namespace std; | |
int x1, x2, y1, y2, z1, z2 = 0; | |
void point3d(int x, int y, int z) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BuildList r where | |
type Build r :: * -> * | |
build' :: [a] -> a -> Build r a | |
instance BuildList a [a] where | |
type Build [a] = [a] | |
build' l x = reverse $ x:l | |
instance BuildList a r => BuildList a (a -> r) where | |
build' l x = \ y -> build'(x:l) y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> {-# OPTIONS -fglasgow-exts #-} | |
> | |
> module VarArg where | |
> import Data.FiniteMap -- for an example below | |
> | |
> class BuildList a r | r-> a where | |
> build' :: [a] -> a -> r | |
> | |
> instance BuildList a [a] where | |
> build' l x = reverse$ x:l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<JavaScriptType>] | |
type Test = | |
inherit Web.Control | |
new () = {} | |
[<JavaScript>] | |
override this.Body = | |
let container = Div [ StyleAttribute "width:500px; height:300px;" ] | |
if Google.Maps.Base.BrowserIsCompatible() |> not then | |
JavaScript.window.alert "Your browser is not compatible with Google Maps" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// The color of the axis. | |
/// Possible values are as those of the <a href="#backgroundColor">backgroundColor</a> configuration option. | |
/// Default Value: default color | |
axisColor : obj(*string or Object*) | |
/// The border around axis background. | |
/// Possible values are as those of the <a href="#backgroundColor">backgroundColor</a> configuration option. | |
/// Default Value: default color | |
axisBackgroundColor : obj(*string or Object*) | |
/// Font size of the chart axis text, in pixels. | |
/// Default Value: automatic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// The color of the axis. | |
/// Possible values are as those of the <a href="#backgroundColor">backgroundColor</a> configuration option. | |
/// Default Value: default color | |
axisColor : obj(*string or Object*) | |
/// The border around axis background. | |
/// Possible values are as those of the <a href="#backgroundColor">backgroundColor</a> configuration option. | |
/// Default Value: default color | |
axisBackgroundColor : obj(*string or Object*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// The lowest value for a range marked by a green color. | |
/// | |
/// Default Value: none | |
greenFrom : float | |
/// The highest value for a range marked by a green color. | |
/// | |
/// Default Value: none | |
greenTo : float |