Created
August 24, 2015 00:05
-
-
Save jrdmcgr/5e8a0363c82c695e7218 to your computer and use it in GitHub Desktop.
This file contains 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
:- dynamic people/1. | |
:- dynamic portray_message/2. | |
:- use_module(library(prosqlite)). | |
set_gender(_, []). | |
set_gender(Sex, [Name|Names]) :- | |
sex(Name, Sex), | |
set_gender(Sex, Names). | |
main :- | |
DBPath = '/Users/jared2/Desktop/learn-prolog/family-tree', | |
sqlite_connect(DBPath, Connection, [ | |
alias(db), | |
as_predicates(true), | |
arity(palette) | |
]), | |
findall(Name, people([name=Name, sex='M']), Names), | |
set_gender('M', Names), | |
sqlite_disconnect(Connection). | |
Author
jrdmcgr
commented
Aug 24, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment