Jump to content

Search the Community

Showing results for tags 'Haskell'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. jaberwacky

    Haskell

    This thread is intended to document my progress and small epiphanies as I learn this strange and wonderful language. So I'm following this tutorial: https://en.wikibooks.org/wiki/Yet_Another_Haskell_Tutorial which has been awesome so far I came across the following exercise: And I solved it! I know. I know. Big whoop. It's great for me as someone who started out as a non-math type. The solution I came up with isn't exactly like the official solution though, but it seems to work.
  2. Hi! I've been diving into functional programming lately. Really neat stuff! So here is my first Haskell program (worthy of being called a program?) fizz :: Int -> Bool fizz x = if x `mod` 3 == 0 then True else False buzz :: Int -> Bool buzz x = if x `mod` 5 == 0 then True else False fizzbuzz = [if x `mod` 15 == 0 then "FizzBuzz" else if fizz x then "Fizz" else if buzz x then "Buzz" else show x | x <- [1..100]] This program is the FizzBuzz program described here: http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html Second version with the guidance of a post from that page I linked: fizz :: Int -> Bool fizz x = if mod x 3 == 0 then True else False buzz :: Int -> Bool buzz x = if mod x 5 == 0 then True else False fizzbuzz :: Int -> [Char] fizzbuzz x | mod x 15 == 0 = "FizzBuzz" | fizz x = "Fizz" | buzz x = "Buzz" fizzbuzz x = show x To run: map fizzbuzz [1 .. 100]
×
×
  • Create New...