This file contains hidden or 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
import Data.Complex | |
import PNG | |
type DComp = Complex Double | |
iter :: DComp -> DComp -> DComp | |
iter c 0 = 0 | |
iter c z = z*z + c | |
nest :: (DComp -> DComp) -> DComp -> Integer -> DComp |
This file contains hidden or 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
map (\(k:ks) -> k ++ (k:ks) ) (map (\x -> map (\y -> (x,y)) [1,2,3,4]) [1,2,3,4]) | |
<interactive>:32:54: | |
Couldn't match expected type `[a0]' with actual type `(t0, t1)' | |
In the expression: (x, y) | |
In the first argument of `map', namely `(\ y -> (x, y))' | |
In the expression: map (\ y -> (x, y)) [1, 2, 3, 4] |
This file contains hidden or 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
rowV :: Int -> Picture | |
rowV n | |
| n == 1 = black | |
| n `mod` 2 == 0 = beside white (rowV (n-1)) | |
| otherwise = beside black (rowV (n-1)) | |
rowVe :: Int -> Picture | |
rowVe n | |
| n == 1 = white | |
| n `mod` 2 == 0 = beside black (rowVe (n-1)) |
This file contains hidden or 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
-- Aufgabe 1 a) | |
rangeProduct :: Int -> Int -> Int | |
rangeProduct m n | |
| m == n = m | |
| m < n = m * rangeProduct (m+1) n | |
| otherwise = 0 | |
fac :: Int -> Int | |
fac 0 = 1 |
This file contains hidden or 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
-- ----------------. | |
-- Übungsblatt 1 -- | |
-- ----------------. | |
import Data.Char | |
import Test.QuickCheck | |
-- Aufgabe 3 | |
double x = x + x | |
doubleTwice' x = 2 * double x | |
doubleTwice x = double x + double x |
This file contains hidden or 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 matrixweteaddieren { | |
public static void main (String [] args) { | |
double [] [] m = { | |
{ 7.2, 4.3, 8.0, 3.3}, | |
{ 4.1, 5.0, 1.0, 9.0}, | |
{ 1.0, 3.0, 3.2, 2.4} }; | |
double sum = 0.0; | |
for (int i = 0; i < m.length; i++) | |
{ |
This file contains hidden or 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
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<form> | |
<label for="image">URL: </label><input style="width: 400px;" name="image" value="" id="image_url" type="text" /><input type="submit" /> | |
</form> | |
<div></div> | |
<script type="text/javascript"> |
NewerOlder