Paste: program that fails due to print

Author: Phate6660
Mode: factor
Date: Wed, 10 Mar 2021 22:15:32
Plain Text |
USING: io io.files kernel namespaces ;
IN: factorfetch

: get-kernel ( -- string' )
  with-file-reader (
    /proc/sys/kernel/osrelease 
    utf8 
    --
    string'
  )
  dup ; inline

: print-kernel ( -- string' )
  "Kernel = " print
  [ get-kernel print ] ; inline

: output ( -- )
  print-kernel
  print ; inline

New Annotation

Summary:
Author:
Mode:
Body: