sirayla calisan talimatlar toplami.
calisma alani
OCaml
OCaml icin sifirdan pratik ogrenme yolu
once tanim
OCaml nedir
OCaml kesin talimatlar yazmak icindir. Burada onu OCaml icin sifirdan pratik ogrenme yolu olarak ogreniyorsun. Baslangic modeli: girdi adimlardan gecer ve cikti olur.
main.mlcalistir ocaml main.mlaliskanlik OCaml icin kucuk bir parca ogren, minimal ornek yaz ve calistirdeger veridir. degisken bu veriyi tutan isimdir.
girdi alip sonuc ureten isimli kucuk is.
OCaml main.ml icindeki kodu calistirir.
ilk okunur kod
program ciktisi
entry point output syntax print_intprint_int 42
cikti 42dil soyu
OCaml aile agaci
OCaml nereden gelir, hangi diller yakindir ve sonra ne ogrenilir.
sifirdan
Soru bankasi
Once ara sonra calis
Bir asama sec veya bu dilin soru bankasinda ara ve alistirmaya gec.
OCaml soru 1
OCaml soru 1. deger yazdirma icin en uygun ifadeyi sec.
OCaml soru 2
OCaml soru 2. degeri adlandirma icin en uygun ifadeyi sec.
OCaml soru 3
OCaml soru 3. yeniden kullanilabilir fonksiyon icin en uygun ifadeyi sec.
OCaml soru 4
OCaml soru 4. temel koleksiyon icin en uygun ifadeyi sec.
OCaml soru 5
OCaml soru 5. deger yazdirma icin en uygun ifadeyi sec.
OCaml soru 6
OCaml soru 6. degeri adlandirma icin en uygun ifadeyi sec.
OCaml soru 7
OCaml soru 7. yeniden kullanilabilir fonksiyon icin en uygun ifadeyi sec.
OCaml soru 8
OCaml soru 8. temel koleksiyon icin en uygun ifadeyi sec.
OCaml soru 9
OCaml soru 9. deger yazdirma icin en uygun ifadeyi sec.
OCaml soru 10
OCaml soru 10. degeri adlandirma icin en uygun ifadeyi sec.
OCaml soru 11
OCaml soru 11. yeniden kullanilabilir fonksiyon icin en uygun ifadeyi sec.
OCaml soru 12
OCaml soru 12. temel koleksiyon icin en uygun ifadeyi sec.
OCaml soru 13
OCaml soru 13. deger yazdirma icin en uygun ifadeyi sec.
OCaml soru 14
OCaml soru 14. degeri adlandirma icin en uygun ifadeyi sec.
OCaml soru 15
OCaml soru 15. yeniden kullanilabilir fonksiyon icin en uygun ifadeyi sec.
OCaml soru 16
OCaml soru 16. temel koleksiyon icin en uygun ifadeyi sec.
OCaml soru 17
OCaml soru 17. deger yazdirma icin en uygun ifadeyi sec.
OCaml soru 18
OCaml soru 18. degeri adlandirma icin en uygun ifadeyi sec.
coktan secmeli
OCaml soru 1
OCaml soru 1. deger yazdirma icin en uygun ifadeyi sec.
print_int 42
referans
main.ml kaliplari
ocaml main.mlentry point output syntax print_int
program ciktisi
print_int 42
- Run the smallest file first
- Print one known value
- Check the output before adding more code
variables assignment types let
degerler ve isimler
let total = 42 let () = print_int total
- Give values readable names
- Keep one idea per line while learning
- Trace the value before changing it
function collection List
fonksiyonlar ve koleksiyonlar
let add a b = a + b let scores = [40; 2] let () = print_int (List.length scores)
- Keep functions small
- Return useful values
- Use the common collection before reaching for frameworks