SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
ikegami@madscientist.jp




                          1
2
3
4
5
6
7
8
9
a = 10   a = 10      a = 10
b = 20     b = 20   b = 20
c = 30   c = 30      c = 30




                              10
11
a=b+c    a=b+c
 where    where
  b=2      { b = 2;
  c=3        c = 3; }




                        12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
main :: IO ()
main = mapM_ (putStrLn . fizzBuzz) [1..]

fizzBuzz :: Integer -> String
fizzBuzz x
  | x `mod` 15 == 0 = quot;FizzBuzzquot;
  | x `mod` 3 == 0 = quot;Fizzquot;
  | x `mod` 5 == 0 = quot;Buzzquot;
  | otherwise = show x



                                           30
31
unsafePerformIO
import System.IO.Unsafe
unsafePerformIO :: IO a -> a


                               32
unsafePerformIO
import Data.Generics
cast :: (Typeable a, Typeable b)
  => a -> Maybe b


                                   33
Haskell FFI
     FFI = Foreign Function Interface

import Foreign
data CChar
data CInt


                                        34
Windows API

import System.Win32
hKEY_CURRENT_USER :: HKEY



                            35
Dons’ eval
http://www.cse.unsw.edu.au/~dons/hs-plugins/
eval :: Typeable a => String ->
[Import] -> IO (Maybe a)




                                               36

Mais conteúdo relacionado

Mais procurados (12)

Plot3D Package and Example in R.-Data visualizat,on
Plot3D Package and Example in R.-Data visualizat,onPlot3D Package and Example in R.-Data visualizat,on
Plot3D Package and Example in R.-Data visualizat,on
 
Oops in c++
Oops in c++Oops in c++
Oops in c++
 
Cpp
Cpp Cpp
Cpp
 
Om (Cont.)
Om (Cont.)Om (Cont.)
Om (Cont.)
 
Midi pc to_cc_port_for_kontakt_marcelo port
Midi pc to_cc_port_for_kontakt_marcelo portMidi pc to_cc_port_for_kontakt_marcelo port
Midi pc to_cc_port_for_kontakt_marcelo port
 
Include
IncludeInclude
Include
 
week-2x
week-2xweek-2x
week-2x
 
Ruby haskell extension
Ruby haskell extensionRuby haskell extension
Ruby haskell extension
 
Better performance through Superscalarity
Better performance through SuperscalarityBetter performance through Superscalarity
Better performance through Superscalarity
 
Fragmentation
FragmentationFragmentation
Fragmentation
 
XKE Typeclass
XKE TypeclassXKE Typeclass
XKE Typeclass
 
PythonArtCode
PythonArtCodePythonArtCode
PythonArtCode
 

Destaque (8)

Lightening Talk at Open Source Conference 2007
Lightening Talk at Open Source Conference 2007Lightening Talk at Open Source Conference 2007
Lightening Talk at Open Source Conference 2007
 
Royale CroisièRe
Royale CroisièReRoyale CroisièRe
Royale CroisièRe
 
Apoyo A Medicos
Apoyo A MedicosApoyo A Medicos
Apoyo A Medicos
 
LenguajesyeducacióN
LenguajesyeducacióNLenguajesyeducacióN
LenguajesyeducacióN
 
Advertising with ElevateTV
Advertising with ElevateTVAdvertising with ElevateTV
Advertising with ElevateTV
 
HOM CHARLA 2
HOM  CHARLA 2HOM  CHARLA 2
HOM CHARLA 2
 
Cooler
CoolerCooler
Cooler
 
Introduction to Haskell games in Open Source Conference 2007 Hokkaido
Introduction to Haskell games in Open Source Conference 2007 HokkaidoIntroduction to Haskell games in Open Source Conference 2007 Hokkaido
Introduction to Haskell games in Open Source Conference 2007 Hokkaido
 

Último

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 

Último (20)

TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 

Advanced Topics in Haskell